matthewmueller / date

Date() for humans
http://matthewmueller.github.io/date/
1.48k stars 87 forks source link

how crazy would this lib be if it supported ranges #32

Open ianstormtaylor opened 11 years ago

ianstormtaylor commented 11 years ago

"i'm available any time thursday before 2pm."

would equate to

Thursday 00:00 – Thursday 14:00

mind blown. that's all. close this whenever you want ;)

matthewmueller commented 11 years ago

Haha yah for sure. I see this lib as handling the "point in time" dates. There's also a need for:

I started an intervals library based off this: https://github.com/matthewmueller/every but i'm not aware of any libs that handle ranges.

This lib will need a better way to extend the vocabulary to allow for things like anytime between, etc.

cold-logic commented 11 years ago

Just throwing this out there for anyone else who's looking: http://gf3.github.io/moment-range/

0xgeert commented 8 years ago

Anyone ever attempted this?

kengz commented 8 years ago

yeah that'd be crazy, for example: last week would give a pair of start and end dates with a 7-day interval. Like @matthewmueller mentioned, there's 3 types of time-parser usage:

Of course, apart from these, we need a sufficiently good natural language parsing. This shan't requirement any fancy NLP.

I think imaginable that all these can be unified under a single project?