add YEAR to LAST/NEXT relative dates
This commit is contained in:
parent
29907cfc7c
commit
17222abf63
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ class EventResource(BaseEvent):
|
|||
m = re.match('(LAST|NEXT)(YEAR|MONTH|WEEK|DAY|HOUR|MINUTE)',when)
|
||||
if m is not None:
|
||||
when = m.group(1)+'1'+m.group(2)+'S'
|
||||
m = re.match('(LAST|NEXT)([0-9]*)(YEAR|MONTHMONTH|WEEK|MINUTE|HOUR|DAY)S',when)
|
||||
m = re.match('(LAST|NEXT)([0-9]*)(YEAR|MONTH|WEEK|MINUTE|HOUR|DAY)S',when)
|
||||
if m is not None:
|
||||
if m.group(1) == 'LAST':
|
||||
event_start = "now() - INTERVAL '%s %s'" % m.group(2,3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue