Comments (4)
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:
- scheduling (this repo): give a single point in time, future or past
- range: a generalization of scheduling = gives more than one point in time
- cron: gives a cron time pattern, mainly to schedule a cron job.
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?
from date.
Haha yah for sure. I see this lib as handling the "point in time" dates. There's also a need for:
- intervals
- ranges
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.
from date.
Just throwing this out there for anyone else who's looking:
http://gf3.github.io/moment-range/
from date.
Anyone ever attempted this?
from date.
Related Issues (20)
- post meridiem is ignored in `"at 3:00 p.m."`, but not in `"at 3:00 pm"`
- Why are you returning a default date when the supplied input is invalid? HOT 1
- Unofficial date.js has new v4.0.0 - possible malware
- How to get start and end date of current month and week?
- function to determine if an input is valid or not
- var _year = 56 * _week
- Add TypeScript support
- Fixes with NLP HOT 2
- Decimal values cause unexpected results
- "100 days ago" not working HOT 5
- Return error if date not understood HOT 2
- '100 days from now' not working HOT 1
- Security Vulnerability in npm package
- Querying 'next monday' on a monday gives you today, when it should return next week's monday
- Error using standalone file in dist HOT 3
- Today is tomorrow HOT 1
- 'at 6.09am' does not work but 'at 6:09am does'
- in 120 seconds return wrong time. HOT 1
- date is undefined: can't import module HOT 1
- date("30 days ago at 18:00") gives date which is 1 month ahead in nodeJS. (instead of 1 month old date)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from date.