PeriodO date parser
Natural language date parsing for historical time periods.
Supported year formats
-
Example: 2000BP
-
Example: 5000
-
Example: 1917AD, 1200BCE
-
Approximate dates
Example: 1200B.C., ca. 1923
-
Date ranges
Example: 21st century, early 14th century, 1200/1400
Example
const parser = // throws parser.SyntaxError if unsuccessfulconsole;// { _type: 'gregorian', in: { year: '0200' }, label: '200 AD' } console;// { _type: 'gregorian',// in: { earliestYear: '2034', latestYear: '2067' },// label: 'middle of the 21st century' }