mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TW-1715: Dates misinterpreted when no dateformat active.
- To be more specific, dates were misinterpreted when an input date was could be unambiguously parsed as either ISO or dateformat, for example, if the dateformat was 'Y-M-D', it matches ISO 'Y-M-DTH:N:S', and the dateformat was considered a match which ignored the 'H:N:S', if specified.
This commit is contained in:
parent
980dff3048
commit
f687ea1010
2 changed files with 9 additions and 0 deletions
|
@ -564,6 +564,14 @@ bool ISO8601d::parse_formatted (Nibbler& n, const std::string& format)
|
|||
}
|
||||
}
|
||||
|
||||
// It is possible that the format='Y-M-D', and the input is Y-M-DTH:N:SZ, and
|
||||
// this should not be considered a match.
|
||||
if (! n.depleted () && ! Lexer::isWhitespace (n.next ()))
|
||||
{
|
||||
n.restore ();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Missing values are filled in from the current date.
|
||||
if (year == -1)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue