You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a date is trailed by a dash, it is retained as part of the date. I assume this is because compromise-dates considers it part of an (incomplete) dash date-range (i.e. 2024-01-01 - 2024-01-02)?
Example:
'use strict'constnlp=require('compromise')constnlpDates=require('compromise-dates')nlp.plugin(nlpDates)consttext='2025-05-11 - They have taken the bridge and the Second Hall'constdoc=nlp(text)console.log(doc.dates().out())/** * Output: 2025-05-11 - * Expected: 2025-05-11 */