mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 22:33:08 +02:00
Dates
- Converted atoi to strtol, and added the missing include.
This commit is contained in:
parent
d9e1607f05
commit
623b1619df
1 changed files with 3 additions and 2 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <cmake.h>
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <text.h>
|
||||
#include <Dates.h>
|
||||
|
@ -391,12 +392,12 @@ bool namedDates (const std::string& name, Variant& value)
|
|||
|
||||
if (isdigit (name[1]))
|
||||
{
|
||||
number = atoi (name.substr (0, 2).c_str ());
|
||||
number = strtol (name.substr (0, 2).c_str (), NULL, 10);
|
||||
ordinal = lowerCase (name.substr (2));
|
||||
}
|
||||
else
|
||||
{
|
||||
number = atoi (name.substr (0, 2).c_str ());
|
||||
number = strtol (name.substr (0, 2).c_str (), NULL, 10);
|
||||
ordinal = lowerCase (name.substr (1));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue