char *time_HHMM_as_string(void)
{
- static char str[] = "HH:MMPM";
- static int maxlen = strlen("HH:MMPM") + 1;
+ static char str[] = "¸á¸åHH»þMMʬ";
+ static int maxlen = strlen("¸áÁ°HH»þMMʬ") + 1;
int hr = Clock.hour;
int min = Clock.min;
int n;
hr = (hr > 12) ? (hr - 12) : hr;
hr = (hr == 0) ? 12 : hr;
- n = snprintf(str, maxlen, "%2d:%02d%2s",
- hr, min, (Clock.hour >= 12) ? "PM" : "AM");
+ n = snprintf(str, maxlen, "%s%2d»þ%2dʬ",
+ (Clock.hour >= 12) ? "¸á¸å": "¸áÁ°", hr, min);
assert(n != -1);
return str;
} // time_HHMM_as_string()
char *vague_time_as_string(void)
{
- static char str[] = "late afternoon";
- static int maxlen = strlen("late afternoon") + 1;
+ static char str[] = "ͼÊý";
+ static int maxlen = strlen("ͼÊý") + 1;
int hr = Clock.hour;
int n;
if (hr < 4)
{
- n = snprintf(str, maxlen, "night");
+ n = snprintf(str, maxlen, "Ìë");
}
else if (hr < 7)
{
- n = snprintf(str, maxlen, "early morning");
+ n = snprintf(str, maxlen, "ÁáÄ«");
}
else if (hr < 11)
{
- n = snprintf(str, maxlen, "morning");
+ n = snprintf(str, maxlen, "ī");
}
else if (hr < 13)
{
- n = snprintf(str, maxlen, "noon");
+ n = snprintf(str, maxlen, "¸áÁ°");
}
else if (hr < 15)
{
- n = snprintf(str, maxlen, "afternoon");
+ n = snprintf(str, maxlen, "¸á¸å");
}
else if (hr < 18)
{
- n = snprintf(str, maxlen, "late afternoon");
+ n = snprintf(str, maxlen, "ͼÊý");
}
else if (hr < 20)
{
- n = snprintf(str, maxlen, "evening");
+ n = snprintf(str, maxlen, "ÈÕ");
}
else
{
- n = snprintf(str, maxlen, "night");
+ n = snprintf(str, maxlen, "Ìë");
}
assert(n != -1);
return str;
int month = Clock.month;
switch (month) {
case 0:
- return "1st Month";
+ return "1·î";
case 1:
- return "2nd Month";
+ return "2·î";
case 2:
- return "3rd Month";
+ return "3·î";
case 3:
- return "4th Month";
+ return "4·î";
case 4:
- return "5th Month";
+ return "5·î";
case 5:
- return "6th Month";
+ return "6·î";
case 6:
- return "7th Month";
+ return "7·î";
case 7:
- return "8th Month";
+ return "8·î";
case 8:
- return "9th Month";
+ return "9·î";
case 9:
- return "10th Month";
+ return "10·î";
case 10:
- return "11th Month";
+ return "11·î";
case 11:
- return "12th Month";
+ return "12·î";
default:
assert(0);
}
int week = Clock.week;
switch (week) {
case 0:
- return "1st Week";
+ return "Âè1½µ";
case 1:
- return "2nd Week";
+ return "Âè2½µ";
case 2:
- return "3rd Week";
+ return "Âè3½µ";
case 3:
- return "4th Week";
+ return "Âè4½µ";
default:
assert(0);
}
int day = Clock.day;
switch (day) {
case 0:
- return "1st Day";
+ return "Âè1ÍËÆü";
case 1:
- return "2nd Day";
+ return "Âè2ÍËÆü";
case 2:
- return "3rd Day";
+ return "Âè3ÍËÆü";
case 3:
- return "4th Day";
+ return "Âè4ÍËÆü";
case 4:
- return "5th Day";
+ return "Âè5ÍËÆü";
case 5:
- return "6th Day";
+ return "Âè6ÍËÆü";
case 6:
- return "7th Day";
+ return "Âè7ÍËÆü";
default:
assert(0);
}