Lexer: Migrated to unicodeLatinDigit

This commit is contained in:
Paul Beckingham
2018-01-25 01:08:26 -05:00
parent adc965e762
commit cae3f06b7d
4 changed files with 30 additions and 38 deletions

View File

@@ -42,6 +42,7 @@
#include <Datetime.h>
#include <Duration.h>
#include <format.h>
#include <unicode.h>
#include <util.h>
#include <main.h>
@@ -231,7 +232,7 @@ Datetime getNextRecurrence (Datetime& current, std::string& period)
return current + (days * 86400);
}
else if (Lexer::isDigit (period[0]) &&
else if (unicodeLatinDigit (period[0]) &&
period[period.length () - 1] == 'm')
{
int increment = strtol (period.substr (0, period.length () - 1).c_str (), NULL, 10);
@@ -284,7 +285,7 @@ Datetime getNextRecurrence (Datetime& current, std::string& period)
return Datetime (y, m, d, ho, mi, se);
}
else if (Lexer::isDigit (period[0]) && period[period.length () - 1] == 'q')
else if (unicodeLatinDigit (period[0]) && period[period.length () - 1] == 'q')
{
int increment = strtol (period.substr (0, period.length () - 1).c_str (), NULL, 10);