mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 22:47:20 +02:00
Bug Fix - #195
- Fixed problem where the date 7/31/2009, when interpreted with rc.dateformat:m/d/y, is truncated to 7/31/20.
This commit is contained in:
parent
1900ee93f7
commit
c275ded443
1 changed files with 4 additions and 1 deletions
|
@ -120,7 +120,7 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
|
|||
|
||||
// Double digit.
|
||||
case 'y':
|
||||
if (i + 1 >= mdy.length () ||
|
||||
if (i + 1 >= mdy.length () ||
|
||||
! ::isdigit (mdy[i + 0]) ||
|
||||
! ::isdigit (mdy[i + 1]))
|
||||
{
|
||||
|
@ -181,6 +181,9 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */)
|
|||
}
|
||||
}
|
||||
|
||||
if (i < mdy.length ())
|
||||
throw std::string ("\"") + mdy + "\" is not a valid date in " + format + " format.";
|
||||
|
||||
if (!valid (month, day, year))
|
||||
throw std::string ("\"") + mdy + "\" is not a valid date.";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue