最佳答案
在 Git 源代码中的 约会 C文件中,我注意到特殊时间名称的以下结构:
static const struct special {
const char *name;
void (*fn)(struct tm *, struct tm *, int *);
} special[] = {
{ "yesterday", date_yesterday },
{ "noon", date_noon },
{ "midnight", date_midnight },
{ "tea", date_tea },
{ "PM", date_pm },
{ "AM", date_am },
{ "never", date_never },
{ "now", date_now },
{ NULL }
};
我理解其中大部分的实用性(多少有点) ,但是为什么要有一个“下午茶”时间(它的计算结果是17:00小时) ?这只是某种 复活节彩蛋吗?