Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darenmalfait/extract-date-js
Extracty date from text
https://github.com/darenmalfait/extract-date-js
Last synced: about 15 hours ago
JSON representation
Extracty date from text
- Host: GitHub
- URL: https://github.com/darenmalfait/extract-date-js
- Owner: darenmalfait
- License: mit
- Created: 2023-02-09T13:51:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T16:58:34.000Z (3 months ago)
- Last Synced: 2024-10-25T04:45:15.850Z (3 months ago)
- Language: TypeScript
- Size: 356 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# `extract-date-js`
## Install
```
npm install extract-date-js
```## Usage
```js
import {extractDateFromText} from 'extract-date-js';const text = 'The meeting is scheduled for June 5th, 2022 at 10:00 AM. The deadline for the project is March 3, 2022. The document was created on January 1, 2022 and last updated on 02/01/2022. The team will reconvene on December 20, 2022 at 5:30 PM. The next board meeting is set for 11.05.2022. Finally, the deadline for the proposal is January 20, 2022.';
const earliestDate = extractDateFromText(text) // '2022-01-01
const firstDate = extractDateFromText(text, { type: 'first' }) // '2022/06/05
```