(relative_time_table): Use tDAY_UNIT for "tomorrow", "yesterday",
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 3 Sep 2003 07:11:45 +0000 (07:11 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 3 Sep 2003 07:11:45 +0000 (07:11 +0000)
"today", and "now" rather than tMINUTE_UNIT.  Of course with
correspondingly smaller numbers for tomorrow and yesterday.  From
Tadayoshi Funaba.  Originally installed into sh-utils on 1999-08-07,
but the patch got lost (I guess during the coreutils merge?).

lib/getdate.y

index b35130b7c854a24c43bc27e134ce8499b31ee009..c131dde13f7fcd6157214ba8219b7ebfa00c9604 100644 (file)
@@ -527,10 +527,10 @@ static table const time_units_table[] =
 /* Assorted relative-time words. */
 static table const relative_time_table[] =
 {
-  { "TOMORROW",        tMINUTE_UNIT,   24 * 60 },
-  { "YESTERDAY",tMINUTE_UNIT,  - (24 * 60) },
-  { "TODAY",   tMINUTE_UNIT,    0 },
-  { "NOW",     tMINUTE_UNIT,    0 },
+  { "TOMORROW",        tDAY_UNIT,       1 },
+  { "YESTERDAY",tDAY_UNIT,     -1 },
+  { "TODAY",   tDAY_UNIT,       0 },
+  { "NOW",     tDAY_UNIT,       0 },
   { "LAST",    tUNUMBER,       -1 },
   { "THIS",    tUNUMBER,        0 },
   { "NEXT",    tUNUMBER,        1 },