https://github.com/featurist/extract-dates
Finds dates in strings
https://github.com/featurist/extract-dates
Last synced: 18 days ago
JSON representation
Finds dates in strings
- Host: GitHub
- URL: https://github.com/featurist/extract-dates
- Owner: featurist
- Created: 2015-06-28T15:23:28.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-28T22:37:47.000Z (over 10 years ago)
- Last Synced: 2025-02-21T19:02:59.277Z (11 months ago)
- Language: PogoScript
- Size: 117 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# extract-dates
Finds dates in strings where date formats are varied and unpredictable.
```JavaScript
var extractDates = require('extract-dates');
extractDates("1945/05/04-12/23/99, jan 2001 or 2015");
/*
produces:
[
{ year: 1945, month: 5, day: 4 },
{ year: 1999, month: 12, day: 23 },
{ year: 2001, month: 1 },
{ year: 2015 }
]
*/
```
### Install
```
npm install extract-dates
```
### License
BSD