flâneur

wanasit/chrono: A natural language date parser in Javascript

github.com · 1,649 words · saved by 1 readers

Today's "Friday" is different from last month's "Friday". The meaning of the referenced dates depends on when and where they are mentioned. Chrono lets you define the reference as Date or ParsingReference object: forwardDate (boolean) to assume the results should happen after the reference date (forward into the future) timezones Override or add custom mappings between timezone abbreviations and offsets. Use this when you want Chrono to parse certain text into a given timezone offset. Chrono supports both unambiguous (normal) timezone mappings and ambigous mappings where the offset is different during and outside of daylight savings. For example: Chrono comes with strict mode that parse only formal date patterns. By default, Chrono is configured to handle only international English. This differs from the previous version of Chrono that would try all locales by default. There are several locales supported contributed by multiple developers under ./locales directory. Current supported lo

A natural language date parser in Javascript. It is designed to handle most date/time format and extract information from any given text: Today, Tomorrow, Yesterday, Last Friday, etc 17 August 2013 - 19 August 2013 This Friday from 13:00 - 16.00 5 days ago 2 weeks from now Sat Aug 17 2013 18:40:39 GMT+0900 (JST) 2014-11-30T08:15:30-05:30 Installation With npm: $ npm install --save chrono-node import * as chrono from 'chrono-node'; chrono.parseDate('An appointment on Sep 12-13'); For Node.js: const chrono = require('chrono-node'); // or `import chrono from 'chrono-node'` for…

saved by

related reading