mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Revert "CmdCalendar: Converted from strtol to std::stoul/stoi"
This reverts commit 3745f83a7b
.
This commit is contained in:
parent
665863809d
commit
639e04d853
1 changed files with 3 additions and 3 deletions
|
@ -127,12 +127,12 @@ int CmdCalendar::execute (std::string& output)
|
|||
|
||||
// YYYY.
|
||||
else if (Lexer::isAllDigits (arg) && arg.length () == 4)
|
||||
argYear = std::stoi (arg);
|
||||
argYear = strtol (arg.c_str (), NULL, 10);
|
||||
|
||||
// MM.
|
||||
else if (Lexer::isAllDigits (arg) && arg.length () <= 2)
|
||||
{
|
||||
argMonth = std::stoi (arg);
|
||||
argMonth = strtol (arg.c_str (), NULL, 10);
|
||||
if (argMonth < 1 || argMonth > 12)
|
||||
throw format (STRING_CMD_CAL_BAD_MONTH, arg);
|
||||
}
|
||||
|
@ -569,7 +569,7 @@ std::string CmdCalendar::renderMonths (
|
|||
task.has ("due"))
|
||||
{
|
||||
std::string due = task.get ("due");
|
||||
ISO8601d duedmy (static_cast <time_t> (std::stoul (due)));
|
||||
ISO8601d duedmy (strtol (due.c_str(), NULL, 10));
|
||||
|
||||
if (duedmy.day () == d &&
|
||||
duedmy.month () == months[mpl] &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue