robertwilczynski / nChronic

A natural language date/time parser ported from Ruby
MIT License
67 stars 34 forks source link

Evaluating current year versus next year #18

Open wbreza opened 7 years ago

wbreza commented 7 years ago

Is there a way to set the scope of the year differently depending on some configurable option? Take the following 2 questions?

  1. "How many items did we sell in april?" (This span should always be in the past)
  2. "Schedule my next appointment in april" (This span should always be in the future)

For example 1 I would always want it to parse the value as "last april" For example 2 I would always want it to parse the value as "next april"

Any options for this without manually modifying the parsed spans?