Commit 9124ccda authored by Jérome Perrin's avatar Jérome Perrin

XXX notes for this state

parent 7ba08a09
# git's approxidate test "as is"
both python and go libraries do not support inputs like `1.month.ago`, so we preprocess to remove the `.`. (python's dateparser supports some formats though)
```
python prototype/proto.py
ERROR timespec: 10am noon expected time: 2009-08-29T12:00:00Z parsed time: 2009-08-30T10:00:00Z
ERROR timespec: last tuesday expected time: 2009-08-25T19:20:00Z parsed time: None
ERROR timespec: July 5th expected time: 2009-07-05T19:20:00Z parsed time: 2009-07-05T00:00:00Z
ERROR timespec: 06/05/2009 expected time: 2009-06-05T19:20:00Z parsed time: 2009-06-05T00:00:00Z
ERROR timespec: 06.05.2009 expected time: 2009-05-06T19:20:00Z parsed time: 2009-06-05T00:00:00Z
ERROR timespec: 2008-12-01 expected time: 2008-12-01T19:20:00Z parsed time: 2008-12-01T00:00:00Z
ERROR timespec: 2009-12-01 expected time: 2009-12-01T19:20:00Z parsed time: 2009-12-01T00:00:00Z
$ go run prototype/proto.go
ERROR timespec: 2.years.3.months.ago expected time: 2007-05-30T19:20:00Z parsed time: 2009-05-30T19:20:00Z
ERROR timespec: 10am noon expected time: 2009-08-29T12:00:00Z parsed time: 2009-08-30T10:00:00Z
ERROR timespec: 06/05/2009 expected time: 2009-06-05T19:20:00Z parsed time: 2009-06-05T00:00:00Z
ERROR timespec: 06.05.2009 expected time: 2009-05-06T19:20:00Z parsed time: 2009-06-05T00:00:00Z
ERROR timespec: Jun 6, 5AM expected time: 2009-06-06T05:00:00Z parsed time: 0000-06-06T00:00:05Z
ERROR timespec: 5AM Jun 6 expected time: 2009-06-06T05:00:00Z parsed time: 0000-06-01T00:00:05Z
ERROR timespec: 2008-12-01 expected time: 2008-12-01T19:20:00Z parsed time: 2008-12-01T00:00:00Z
ERROR timespec: 2009-12-01 expected time: 2009-12-01T19:20:00Z parsed time: 2009-12-01T00:00:00Z
```
* `10am noon` is ambigious, we don't want so support it.
* date only `2008-12-01` should not retain "current" hour:minute
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment