summaryrefslogtreecommitdiff
path: root/src/time/ISO8601.cxx
AgeCommit message (Collapse)Author
2021-03-04time/ISO8601: don't use glibc extension in strptime.Érico Rolim
Per the manual for strptime, %F is equivalent %Y-%m-%d, so use that directly.
2020-07-23time/ISO8601: use <cstdlib>Max Kellermann
2020-03-12replace assert.h with cassertRosen Penev
The former was deprecated with C++14. According to the C++11 and C++17 standards, both files are identical. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-29Add missing header.Thomas Klausner
Fixes ../src/time/ISO8601.cxx:67:24: error: use of undeclared identifier 'strtoul' unsigned long value = strtoul(s, &endptr, 10); ^ ../src/time/ISO8601.cxx:77:14: error: use of undeclared identifier 'strtoul' minutes = strtoul(s, &endptr, 10); ^ on NetBSD with clang 9.0.0.
2019-12-24time/ISO8601: fix Windows build failureMax Kellermann
Caused by 2bc127bb4336d1de047cca57b07865ed1e53f967
2019-12-24time/ISO8601: refactor ParseTimeOfDay() to parse one by oneMax Kellermann
This prepares the migration away from strptime() for Windows portability. But the real reason I'm doing this is that strptime() on Apple is buggy: strptime("14", "%H%M%S") (without separating colons) succeeds even though only the hour has been parsed. This fixes recent Travis failures in the ParseISO8601() unit test.
2019-12-24time/ISO8601: move code to ParseTimeOfDay()Max Kellermann
2019-12-16time/ISO8601: support omitting field separatorsMax Kellermann
Closes https://github.com/MusicPlayerDaemon/MPD/issues/685
2019-12-16time/ISO8601: support omitting minutesMax Kellermann
2019-12-16time/ISO8601: support omitting secondsMax Kellermann
2019-12-16time/ISO8601: support time zone offsetMax Kellermann
2019-12-16time/ISO8601: allow omitting the "Z" suffixMax Kellermann
And allow "Z" suffix after date.
2019-12-16time/ISO8601: allow omitting the time of dayMax Kellermann
2019-12-16time/ISO8601: ParseISO8601() returns precisionMax Kellermann
2019-12-16time/ISO8601: implement with strptime(), without ParseTimePoint()Max Kellermann
Prepare for adding more flexible parsing.
2019-12-16time/ISO8601: forward-declare StringBufferMax Kellermann
2019-12-16util/Time*: move to time/Max Kellermann