Parsing Arbitrary Dates in Strings with Chrono and a Web Component / / No Comments Yesterday I had an idea for a possible experiment using Chrome’s built-in AI support – looking for "date" references in strings. So for example: "I will have my new job in 12 days". Could the AI model recognize "12 days" as a date and determine what the actual date is, assuming a reference date of now? I was about to start working on a simple POC when I thought… wait… is there already a JavaScript library for this? Of course there is. The aptly named Chrono library does just that. It can parse a string with one assumed date and return the date, so for example: import * as chrono from 'chrono-node'; chrono.parseDate('An appointment on Sep... more → Posted in: JavaScript Tagged with: Arbitrary, Chrono, Component, Dates, Parsing, Strings