$Log$
+Revision 625.7 2005/09/17 13:18:05 ajc
+* fmt_date.c: changes to "brief" mode. It now displays time only if the
+ date is today, month/day/time if the date is within the last six months,
+ and date only for anything older.
+
Revision 625.6 2005/09/17 03:00:06 ajc
* Fixed the autocompletion for CC: and BCC:
* Moved the autocompletion styles into the stylesheet where they belong
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
if (brief) {
+ /* If date == today, show only the time */
if ((tm.tm_year == today_tm.tm_year)
&&(tm.tm_mon == today_tm.tm_mon)
&&(tm.tm_mday == today_tm.tm_mday)) {
);
}
}
+
+ /* Otherwise, for messages up to 6 months old, show the
+ * month and day, and the time */
+ else if (today_timet - thetime < 15552000) {
+ if (!strcasecmp(calhourformat, "24")) {
+ sprintf(buf, "%s %d %2d:%02d",
+ ascmonths[tm.tm_mon],
+ tm.tm_mday,
+ tm.tm_hour, tm.tm_min
+ );
+ }
+ else {
+ sprintf(buf, "%s %d %2d:%02d%s",
+ ascmonths[tm.tm_mon],
+ tm.tm_mday,
+ hour, tm.tm_min,
+ ((tm.tm_hour >= 12) ? "pm" : "am")
+ );
+ }
+ }
+
+ /* older than 6 months, show only the date */
else {
sprintf(buf, "%s %d %d",
ascmonths[tm.tm_mon],