Date: Collapsed 'sunday' and 'sun' into a closeEnough() call

- Removed the STRING_DATE_JANUARY_LONG and STRING_DATE_JANUARY_SHORT,
  replacing them with STRING_DATE_JANUARY and a call to closeEnough().
  This means you can enter 'jan', 'janu', 'janua', 'januar', 'january',
  instead of only 'jan' or 'january'.
This commit is contained in:
Paul Beckingham
2015-07-19 19:52:36 -04:00
parent 2dd2bd22b8
commit f1251303de
12 changed files with 225 additions and 408 deletions

View File

@@ -136,6 +136,8 @@ bool namedDates (const std::string& name, Variant& value)
int i;
int minimum = CLI2::minimumMatchLength;
if (minimum == 0)
minimum = 3;
// Dynamics.
if (closeEnough ("now", name, minimum))