diff options
| author | mio <stigma@disroot.org> | 2025-03-08 19:53:55 +1000 |
|---|---|---|
| committer | mio <stigma@disroot.org> | 2025-03-10 09:13:10 +1000 |
| commit | 7d3bf3e611cf7638426b69564ba1786c307893fb (patch) | |
| tree | 4dcd4af0ee5e9b55abcb05714125577b641a27f7 /tdecore/tests/krfcdatetest.cpp | |
| parent | 0418e523c6365efea9aca1811cb92b830752e76e (diff) | |
| download | tdelibs-7d3bf3e6.tar.gz tdelibs-7d3bf3e6.zip | |
KRFCDate minutes/seconds can be omitted (ISO8601)
ISO 8601 allows for dates and times to be represented with
"reduced precision". In the case of times, this means the
minutes and seconds can be omitted.
More automated tests have been enabled, with the remaining
ones to be fixed up in a later PR.
Signed-off-by: mio <stigma@disroot.org>
(cherry picked from commit b56e68eac7a8e916a905e5f8ebe058907340128b)
Diffstat (limited to 'tdecore/tests/krfcdatetest.cpp')
| -rw-r--r-- | tdecore/tests/krfcdatetest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tdecore/tests/krfcdatetest.cpp b/tdecore/tests/krfcdatetest.cpp index 94358a8f1..c67c5a4e2 100644 --- a/tdecore/tests/krfcdatetest.cpp +++ b/tdecore/tests/krfcdatetest.cpp @@ -59,6 +59,12 @@ int main(int argc, char *argv[]) a = KRFCDate::parseDateISO8601("1994-01-01"); check( "1994-01-01", a, b ); + a = KRFCDate::parseDateISO8601("1994-01-01T12"); + check("1994-01-01T12", a, b); + + a = KRFCDate::parseDateISO8601("1994-01-01T12:00"); + check("1994-01-01T12:00", a, b); + b = 0; // pass RFC date to ISO parser |
