projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update after module 'select' was created.
[gnulib.git]
/
lib
/
getdate.y
diff --git
a/lib/getdate.y
b/lib/getdate.y
index
f9cd86c
..
877b264
100644
(file)
--- a/
lib/getdate.y
+++ b/
lib/getdate.y
@@
-293,7
+293,7
@@
set_hhmmss (parser_control *pc, long int hour, long int minutes,
%token tAGO tDST
%token tYEAR_UNIT tMONTH_UNIT tHOUR_UNIT tMINUTE_UNIT tSEC_UNIT
%token tAGO tDST
%token tYEAR_UNIT tMONTH_UNIT tHOUR_UNIT tMINUTE_UNIT tSEC_UNIT
-%token <intval> tDAY_UNIT
+%token <intval> tDAY_UNIT
tDAY_SHIFT
%token <intval> tDAY tDAYZONE tLOCAL_ZONE tMERIDIAN
%token <intval> tMONTH tORDINAL tZONE
%token <intval> tDAY tDAYZONE tLOCAL_ZONE tMERIDIAN
%token <intval> tMONTH tORDINAL tZONE
@@
-304,7
+304,7
@@
set_hhmmss (parser_control *pc, long int hour, long int minutes,
%type <intval> o_colon_minutes o_merid
%type <timespec> seconds signed_seconds unsigned_seconds
%type <intval> o_colon_minutes o_merid
%type <timespec> seconds signed_seconds unsigned_seconds
-%type <rel> relunit relunit_snumber
+%type <rel> relunit relunit_snumber
dayshift
%%
%%
@@
-502,6
+502,8
@@
rel:
{ apply_relative_time (pc, $1, -1); }
| relunit
{ apply_relative_time (pc, $1, 1); }
{ apply_relative_time (pc, $1, -1); }
| relunit
{ apply_relative_time (pc, $1, 1); }
+ | dayshift
+ { apply_relative_time (pc, $1, 1); }
;
relunit:
;
relunit:
@@
-563,6
+565,11
@@
relunit_snumber:
{ $$ = RELATIVE_TIME_0; $$.seconds = $1.value; }
;
{ $$ = RELATIVE_TIME_0; $$.seconds = $1.value; }
;
+dayshift:
+ tDAY_SHIFT
+ { $$ = RELATIVE_TIME_0; $$.day = $1; }
+ ;
+
seconds: signed_seconds | unsigned_seconds;
signed_seconds:
seconds: signed_seconds | unsigned_seconds;
signed_seconds:
@@
-669,10
+676,10
@@
static table const time_units_table[] =
/* Assorted relative-time words. */
static table const relative_time_table[] =
{
/* Assorted relative-time words. */
static table const relative_time_table[] =
{
- { "TOMORROW", tDAY_
UNIT,
1 },
- { "YESTERDAY",tDAY_
UNIT,
-1 },
- { "TODAY", tDAY_
UNIT,
0 },
- { "NOW", tDAY_
UNIT,
0 },
+ { "TOMORROW", tDAY_
SHIFT,
1 },
+ { "YESTERDAY",tDAY_
SHIFT,
-1 },
+ { "TODAY", tDAY_
SHIFT,
0 },
+ { "NOW", tDAY_
SHIFT,
0 },
{ "LAST", tORDINAL, -1 },
{ "THIS", tORDINAL, 0 },
{ "NEXT", tORDINAL, 1 },
{ "LAST", tORDINAL, -1 },
{ "THIS", tORDINAL, 0 },
{ "NEXT", tORDINAL, 1 },