Lexer: Migrated to unicodeLatinDigit

This commit is contained in:
Paul Beckingham
2018-01-25 01:08:26 -05:00
parent 0086a51311
commit 3d7c681ed0
3 changed files with 27 additions and 36 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>
@@ -238,7 +239,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);
@@ -291,7 +292,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);