How to display weekday on List

Status
Not open for further replies.

mk13

New Member
I am groping for how a day of the week is displayed on a list.Moreover, I am setting a setup of the list formatting to %Y-%m-%d (%W). Although there is no telling whether this is the date format of SQL, a week number will be displayed in this case anyhow. Then, I think that it is necessary to use 'Advanced Allow date function'. However, it does not understand in what may use this how. Does this have relation with a class of java cal ? Or is it realizable by writing the code of PHP? Please let me know in how.

I find out a scrit of java script. if related java cal, I wanted use this.
import java.util.*;

class ExDate2 {
public static void main(String[] args) {
Calendar cal1 = Calendar.getInstance();
int year = cal1.get(Calendar.YEAR);
int month = cal1.get(Calendar.MONTH) + 1;
int day = cal1.get(Calendar.DATE);
int hour = cal1.get(Calendar.HOUR_OF_DAY);
int minute = cal1.get(Calendar.MINUTE);
int second = cal1.get(Calendar.SECOND);

StringBuffer dow = new StringBuffer();
switch (cal1.get(Calendar.DAY_OF_WEEK)) {????????Calendar???
case Calendar.SUNDAY: dow.append("Sun"); break;
case Calendar.MONDAY: dow.append("Mon"); break;
case Calendar.TUESDAY: dow.append("Tue"); break;
case Calendar.WEDNESDAY: dow.append("Wed"); break;
case Calendar.THURSDAY: dow.append("Thu"); break;
case Calendar.FRIDAY: dow.append("Fri"); break;
case Calendar.SATURDAY: dow.append("Sat"); break;
}

System.out.println(year + "/" + month + "/" + day + " " + dow
+ " " + hour + ":" + minute + ":" + second);
}
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top