summaryrefslogtreecommitdiff
path: root/ext/date/lib/parse_date.re
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/lib/parse_date.re')
-rw-r--r--ext/date/lib/parse_date.re13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
index 33932d7087..077b20b94a 100644
--- a/ext/date/lib/parse_date.re
+++ b/ext/date/lib/parse_date.re
@@ -829,6 +829,7 @@ americanshort = month "/" day;
american = month "/" day "/" year;
iso8601dateslash = year4 "/" monthlz "/" daylz "/"?;
dateslash = year4 "/" month "/" day;
+gnudateshorter = year4 "-" month;
gnudateshort = year "-" month "-" day;
iso8601date = year4 "-" monthlz "-" daylz;
pointeddate = day [.\t-] month [.-] year;
@@ -1094,6 +1095,18 @@ relativetext = reltextnumber space reltextunit;
return TIMELIB_ISO_DATE;
}
+ gnudateshorter
+ {
+ DEBUG_OUTPUT("gnudateshorter");
+ TIMELIB_INIT;
+ TIMELIB_HAVE_DATE();
+ s->time->y = timelib_get_nr((char **) &ptr, 4);
+ s->time->m = timelib_get_nr((char **) &ptr, 2);
+ TIMELIB_PROCESS_YEAR(s->time->y);
+ TIMELIB_DEINIT;
+ return TIMELIB_ISO_DATE;
+ }
+
gnudateshort
{
DEBUG_OUTPUT("gnudateshort");