mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Lexer
- Replaced old digitsOnly() function with Lexer::isAllDigits.
This commit is contained in:
parent
9f82926c65
commit
26aff348d2
7 changed files with 9 additions and 26 deletions
|
@ -120,11 +120,11 @@ int CmdCalendar::execute (std::string& output)
|
|||
argWholeYear = true;
|
||||
|
||||
// YYYY.
|
||||
else if (digitsOnly (*arg) && arg->length () == 4)
|
||||
else if (Lexer::isAllDigits (*arg) && arg->length () == 4)
|
||||
argYear = strtol (arg->c_str (), NULL, 10);
|
||||
|
||||
// MM.
|
||||
else if (digitsOnly (*arg) && arg->length () <= 2)
|
||||
else if (Lexer::isAllDigits (*arg) && arg->length () <= 2)
|
||||
{
|
||||
argMonth = strtol (arg->c_str (), NULL, 10);
|
||||
if (argMonth < 1 || argMonth > 12)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue