Open tj opened 10 years ago
Interesting in node v0.10.25
using the current master branch I get
> console.log(date('50 minutes ago'));
Wed Feb 05 2014 15:13:08 GMT+1100 (EST)
> console.log(date('50 minutes from now'));
Wed Feb 05 2014 16:53:09 GMT+1100 (EST)
woah, weird, this was with 0.11.x, I'll try again tomorrow on 0.10.x
@visionmedia sweet! let me know how it works out for you. it's definitely a bit rough around the edges (esp with month queries) but i'm planning on picking it back up again soon.
Hey @MatthewMueller let me know if you need help :)
seems to work okay for me. i tried 10.22 & 11.11:
console.log(date('50 minutes ago'))
console.log(date('50 minutes from now'))
Wed Feb 05 2014 11:52:51 GMT+0100 (CET)
Wed Feb 05 2014 13:32:55 GMT+0100 (CET)
@visionmedia also, one thing to keep in mind is that this parser prefers future dates (was made for scheduling). so if you type ambiguous phrases like '50 minutes', it'll assume '50 minutes from now'. that might not be ideal for logging. definitely down to explore ways to make it more general though.
@bulkan awesome! the 3 big things are:
in thirty minutes
)march 5th
, january sixth
, 12th of march
)1.
sounds interesting. I shall work on it
going to use this for a badass log query language :D