aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/message-list.c37
2 files changed, 33 insertions, 9 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 193d276e05..0b6ce30585 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2000-12-24 Christopher James Lahey <clahey@helixcode.com>
+
+ * message-list.c (filter_date): Changed this to do different
+ formatting of dates within the last week.
+
2000-12-24 Not Zed <NotZed@HelixCode.com>
* Merge from camel-mt-branch.
diff --git a/mail/message-list.c b/mail/message-list.c
index c34b01c18f..9d08d04308 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -959,31 +959,50 @@ filter_date (const void *data)
time_t yesdate;
struct tm then, now, yesterday;
char buf[26];
+ gboolean done = FALSE;
if (date == 0)
- return g_strdup ("?");
+ return g_strdup (_("?"));
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 %T", &then);
- } else {
+ strftime (buf, 26, _("Today %T"), &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 %T", &then);
- } else {
- if (then.tm_year == now.tm_year) {
- strftime (buf, 26, "%b %d %T", &then);
- } else {
- strftime (buf, 26, "%b %d %Y", &then);
+ strftime (buf, 26, _("Yesterday %T"), &then);
+ done = TRUE;
+ }
+ }
+ if (!done) {
+ int i;
+ for (i = 2; i < 7; i++) {
+ yesdate = nowdate - 60 * 60 * 24 * i;
+ 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, _("%a %T"), &then);
+ done = TRUE;
+ break;
}
}
}
+ if (!done) {
+ if (then.tm_year == now.tm_year) {
+ strftime (buf, 26, _("%b %d %T"), &then);
+ } else {
+ strftime (buf, 26, _("%b %d %Y"), &then);
+ }
+ }
#if 0
#ifdef CTIME_R_THREE_ARGS
ctime_r (&date, buf, 26);
>2010-12-041-1/+1 * Fix build with GnuPG 1.x (add unconditional dependency on security/libassuan)makc2010-07-282-13/+2 * - Update security/gpgme to version 1.3.0.dougb2010-06-234-73/+127 * Fix build without libassuangarga2009-12-082-1/+11 * - Disable gpgsm if it is not installedamdmi32009-12-031-1/+6 * -Repocopy devel/libtool15 -> libtool22 and libltdl15 -> libltdl22.mezz2009-08-031-1/+1 * - Update to 1.2.0wxs2009-07-164-53/+73 * Update to version 1.1.8. Submitter takes over maintainership.dougb2009-02-217-519/+564 * - Remove conditional checks for FreeBSD 5.x and olderpav2009-01-071-1/+1 * Reset lofi due to not commits in over 3 months, PR backlog, and no responselinimon2008-09-071-1/+1 * Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.rafan2008-08-211-1/+0 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-0/+1 * - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-201-1/+1 * - Unbreak INDEXpav2008-03-081-1/+1 * Don't depend on gpgsm, since it is now a non-default option in the gnupglofi2008-03-081-2/+2 * - Set --mandir and --infodir in CONFIGURE_ARGS if the configure scriptrafan2007-07-231-2/+1 * Remove junk.lofi2007-07-121-1/+0 * Update to 1.1.5lofi2007-07-115-109/+7 * Track libgpg-error shlib version change.jylefort2007-03-081-2/+2 * Patch for "Multiple Messages Problem in GnuPG and GPGME"lofi2007-03-072-1/+66 * Bump PORTREVISIONlofi2007-02-221-1/+2 * Don't depend on gnupg1lofi2007-02-221-2/+2 * From the "Sometimes-you-can-send-patches-upstream-all-you-want-the-bugs-lofi2007-02-101-0/+471 * Update to 1.1.3lofi2007-02-075-21/+27 * - Since security/gnupg (2.x) installs symlink $PREFIX/bin/gpg,kuriyama2006-12-221-2/+2 * Retire gnupg-devel after three years of porting, patching and bugginglofi2006-12-211-2/+2 * - Upgrade gnupg to 2.0.1. Old stable version (1.4.6) was repocopiedkuriyama2006-12-211-2/+2 * - Chase libgpg-error version bump [1]sergei2006-09-221-1/+2 * Fix build on 4.xlofi2006-09-142-0/+30 * Update gpgme to 1.1.2, chase dependencies.lofi2006-09-147-38/+45 * Remove USE_REINPLACE from all categories starting with Sedwin2006-05-131-1/+0 * Conversion to a single libtool environment.ade2006-02-232-0/+4 * SHA256ifyedwin2006-01-241-0/+1 * Mass-conversion to the USE_AUTOTOOLS New World Order. The code presentade2005-11-151-1/+1 * Update gpgme to 1.0.3 and chase shared library version bump.lofi2005-11-055-112/+17 * Fix compilation on FreeBSD 6 or later in the WITH_PTH case.lofi2005-08-092-3/+117 * s/.elseif/.eliflofi2005-04-131-1/+1 * At Kris's request, back out the MACHINE_ARCH spelling correction untilobrien2005-04-121-1/+1 * Assist getting more ports working on AMD64 by obeying theobrien2005-04-111-1/+1 * Update to 1.0.2lofi2005-01-264-456/+6 * - gpgme et gpgme03 are no longer in conflictclement2004-12-211-2/+0 * - Move gpgme.h to ${PREFIX}/include/gpgme/ to make gpgme-1.x andclement2004-12-212-3/+5 * gpgme and gpgme03 are conflicting ports.lofi2004-12-141-0/+2 * Optionalize pth support.lofi2004-12-132-9/+20 * Fix the self-tests instead of just omitting them.lofi2004-12-122-4/+17 * Remove obsolete patch.lofi2004-12-121-27/+0 * Fix dependencies, enable pth-library, respect PTHREAD_LIBS,lofi2004-12-114-19/+482 * Switch maintainer to ports@.marcus2004-12-111-1/+1 * Update to 1.0.1.marcus2004-12-117-52/+13 * Apply a big libtool patch to allow porters to use the libtool installed bymarcus2004-07-101-1/+1 * Update the Aegypten ports to versions compatible with libgcrypt 1.2.0lofi2004-05-041-1/+1 * SIZEify (maintainer timeout)trevor2004-03-311-0/+1 * Whoa there, boy, that's a mighty big commit y'all have there...ade2004-03-141-1/+1 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-041-0/+1 * - Update to 0.3.16pav2004-01-064-11/+19 * o Fix gpgsm support so that conditional WITH_GPGSM really workslioux2003-05-224-1/+48 * Update to 0.3.15.arved2003-05-192-3/+15 * De-pkg-comment.knu2003-02-212-1/+1 * Chase pth's shared lib version.marcus2003-02-181-1/+1 * Use MASTER_SITE_GNUPGarved2003-02-151-1/+2 * Update to 0.3.14arved2003-01-312-4/+5 * Update to 0.3.12arved2003-01-033-13/+2 * Fix email addresses and WWW siteedwin2002-12-122-3/+3 * disable pth detect when configureijliao2002-11-161-0/+1 * upgrade to 0.3.9ijliao2002-09-204-8/+20 * Add missing fileskris2002-09-191-0/+5 * Update to 0.3.6pat2002-05-234-13/+3 * update to 0.2.3.sf2002-01-224-6/+14 * - Update to 0.2.3.knu2001-10-125-5/+19 * USE_LIBTOOL implies GNU_CONFIGURE, so remove the latter where appropriate.sobomax2001-08-311-1/+0 * add gpgmeijliao2001-07-07