aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-cell-date.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c
index 7e48f97a62..00d5ca00aa 100644
--- a/widgets/table/e-cell-date.c
+++ b/widgets/table/e-cell-date.c
@@ -33,19 +33,35 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row)
localtime_r (&date, &then);
localtime_r (&nowdate, &now);
- if (then.tm_mday == now.tm_mday &&
- then.tm_mon == now.tm_mon &&
- then.tm_year == now.tm_year) {
- strftime (buf, 26, _("Today %l:%M %p"), &then);
+
+ if (nowdate - date < 60 * 60 * 8) {
+ strftime (buf, 26, _("%l:%M %p"), &then);
done = TRUE;
}
+
+ if (!done) {
+ if (then.tm_mday == now.tm_mday &&
+ then.tm_mon == now.tm_mon &&
+ then.tm_year == now.tm_year) {
+ strftime (buf, 26, _("Today %l:%M %p"), &then);
+ done = TRUE;
+ }
+ }
if (!done) {
yesdate = nowdate - 60 * 60 * 24;
localtime_r (&yesdate, &yesterday);
if (then.tm_mday == yesterday.tm_mday &&
then.tm_mon == yesterday.tm_mon &&
then.tm_year == yesterday.tm_year) {
- strftime (buf, 26, _("Yesterday %l:%M %p"), &then);
+#if 0
+ if (nowdate - date < 60 * 60 * 12) {
+ strftime (buf, 26, _("Late Yesterday %l:%M %p"), &then);
+ } else {
+#endif
+ strftime (buf, 26, _("Yesterday %l:%M %p"), &then);
+#if 0
+ }
+#endif
done = TRUE;
}
}