*/
/**
* \defgroup MiscCal Miscellaneous functions which handle calendar components.
+ * \ingroup Calendaring
*/
/*@{*/
#include "webcit.h"
#include "webserver.h"
-/* \todo FIXME ... this needs to be internationalized */
-/** Month Strings. */
-char *months[] = {
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
-};
-
-/** Day Strings */
-char *days[] = {
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-};
-
/** Hour strings */
char *hourname[] = {
"12am", "1am", "2am", "3am", "4am", "5am", "6am",
struct tm tm;
const int span = 10;
int all_day_event = 0;
+ time_t monthselect_time;
+ struct tm monthselect_tm;
+ char monthselect_str[32];
char calhourformat[16];
get_preference("calhourformat", calhourformat, sizeof calhourformat);
wprintf(_("Month: "));
wprintf("<SELECT NAME=\"%s_month\" SIZE=\"1\">\n", prefix);
for (i=0; i<=11; ++i) {
+ monthselect_time = 1137997451 + (i * 2592000);
+ localtime_r(&monthselect_time, &monthselect_tm);
+ wc_strftime(monthselect_str, sizeof monthselect_str, "%B", &monthselect_tm);
wprintf("<OPTION %s VALUE=\"%d\">%s</OPTION>\n",
((tm.tm_mon == i) ? "SELECTED" : ""),
i+1,
- months[i]
+ monthselect_str
);
}
wprintf("</SELECT>\n");