escputs((char *)
icalproperty_get_comment(p));
/** \todo: allso ammitime format */
- strftime_l(&sbuf[0], sizeof(sbuf), timeformat, &event_tms,
- wc_locales[WC->selected_language]);
- strftime_l(&ebuf[0], sizeof(sbuf), timeformat, &event_tme,
- wc_locales[WC->selected_language]);
+ wc_strftime(&sbuf[0], sizeof(sbuf), timeformat, &event_tms);
+ wc_strftime(&ebuf[0], sizeof(sbuf), timeformat, &event_tme);
wprintf("</a></font></td>"
"<td bgcolor='%s'>%s</td><td bgcolor='%s'>%s</td></tr>",
int i;
time_t previous_month;
time_t next_month;
+ time_t colheader_time;
+ struct tm colheader_tm;
+ char colheader_label[32];
/** Determine what day to start.
* First, back up to the 1st of the month...
(int)(tm.tm_year)+1900, tm.tm_mon + 1);
wprintf("<IMG ALIGN=MIDDLE src=\"static/prevdate_32x.gif\" BORDER=0></A>\n");
+ wc_strftime(colheader_label, sizeof colheader_label, "%B", &starting_tm);
wprintf(" "
"<FONT SIZE=+1 COLOR=\"#FFFFFF\">"
"%s %d"
"</FONT>"
- " ", months[month-1], year);
+ " ", colheader_label, year);
localtime_r(&next_month, &tm);
wprintf("<a href=\"readfwd?calview=month&year=%d&month=%d&day=1\">",
/** Inner table (the real one) */
wprintf("<TABLE width=100%% border=0 cellpadding=1 cellspacing=1 "
"bgcolor=#204B78><TR>");
+ colheader_time = thetime;
for (i=0; i<7; ++i) {
+ colheader_time = thetime + (i * 86400) ;
+ localtime_r(&colheader_time, &colheader_tm);
+ wc_strftime(colheader_label, sizeof colheader_label, "%A", &colheader_tm);
wprintf("<TD ALIGN=CENTER WIDTH=14%%>"
- "<FONT COLOR=\"#FFFFFF\">%s</FONT></TH>", wdays[i]);
+ "<FONT COLOR=\"#FFFFFF\">%s</FONT></TH>", colheader_label);
}
wprintf("</TR>\n");
"FFFFFF"))
);
if ((i==0) || (tm.tm_mday == 1)) {
- wprintf("%s ", months[tm.tm_mon]);
+ wc_strftime(colheader_label, sizeof colheader_label, "%B", &tm);
+ wprintf("%s ", colheader_label);
}
wprintf("<a href=\"readfwd?calview=day&year=%d&month=%d&day=%d\">"
"%d</A></B><br />",
int i;
time_t previous_month;
time_t next_month;
+ char month_label[32];
/** Determine what day to start.
* First, back up to the 1st of the month...
(int)(tm.tm_year)+1900, tm.tm_mon + 1);
wprintf("<IMG ALIGN=MIDDLE src=\"static/prevdate_32x.gif\" BORDER=0></A>\n");
+ wc_strftime(month_label, sizeof month_label, "%B", &tm);
wprintf(" "
"<FONT SIZE=+1 COLOR=\"#FFFFFF\">"
"%s %d"
"</FONT>"
- " ", months[month-1], year);
+ " ", month_label, year);
localtime_r(&next_month, &tm);
wprintf("<a href=\"readfwd?calview=month&year=%d&month=%d&day=1\">",
/** Now do 35 days */
for (i = 0; i < 35; ++i) {
char weeknumber[255];
+ char weekday_name[32];
char *daycolor;
localtime_r(&thetime, &tm);
/** Before displaying Sunday, start a new CELL */
if ((i % 7) == 0) {
- strftime_l(&weeknumber[0], sizeof(weeknumber), "%U", &tm, wc_locales[WC->selected_language]);
+ wc_strftime(&weeknumber[0], sizeof(weeknumber), "%U", &tm);
wprintf("<TABLE border='0' BGCOLOR=\"#EEEECC\" width='100%'> <tr><th colspan='4'>%s %s</th></tr>"
" <tr><td>%s</td><td width='70%'>%s</td><td>%s</td><td>%s</td></tr>\n",
_("Week"),
"FFFFFF"));
/** Day Header */
- wprintf("<tr><td BGCOLOR='%s' colspan='1' align='left'> %s</td><td BGCOLOR='%s' colspan='3'><hr></td></tr>\n",
- daycolor,
- wdays[i%7],
- daycolor);
+ wc_strftime(weekday_name, sizeof weekday_name, "%A", &tm);
+ wprintf("<tr><td BGCOLOR='%s' colspan='1' align='left'> %s"
+ "</td><td BGCOLOR='%s' colspan='3'><hr></td></tr>\n",
+ daycolor,
+ weekday_name,
+ daycolor);
/** put the data of one day here, stupid */
calendar_month_view_brief_events(thetime, daycolor);
wprintf("<FONT SIZE=+2>%s</FONT><br />"
"<FONT SIZE=+3>%d</FONT><br />"
"<FONT SIZE=+2>%d</FONT><br />",
- months[month-1], day, year);
+ monthname(month-1),
+ day, year);
wprintf("</TD>");
/** Right arrow */