Commit Graph

22 Commits

Author SHA1 Message Date
Martchus dd0ea1d348 Use workaround for unavailable `std::from_chars()` also under older libstdc++ versions 2023-12-06 22:34:33 +01:00
Martchus fbb1d73779 Apply clang-format 2023-12-05 11:42:26 +01:00
Martchus 55146db7e1 Add workaround for missing FP overload for `std::from_chars()` in libc++ 2023-11-25 23:18:30 +01:00
Martchus fdfe8f154c Fix warnings in code of `TimeSpan::fromString()` 2023-11-25 23:15:29 +01:00
Martchus 7bed9cd38c Remove TODOs about parsing/printing custom formats
It makes likely more sense to implement that entirely in user code. The
parsing/printing functions for common formats have also been improved so
this is likely not very relevant anymore anyways.
2023-11-23 20:24:44 +01:00
Martchus 11de58141b Support units in `TimeSpan::fromString()` 2023-11-23 20:20:07 +01:00
Martchus a425363eac Improve `TimeSpan::fromString()`
* Avoid heap allocation and counting separators
* Avoid code repetition
* Throw an exception if too many parts are present (as the documentation
  suggests this function would do)
* Allow emptry separators as this seems useful
2023-11-23 18:48:48 +01:00
Martchus 77c353fb6c Add `TickType` and integer overloads to chrono utilities 2022-02-15 23:01:25 +01:00
Martchus 0feb7d667e Add inline/constexpr to more functions in chrono lib 2019-08-19 19:09:19 +02:00
Martchus b48b2f5c06 Have everything in one top-level namespace 2019-06-10 21:56:46 +02:00
Martchus a89f6f9ce4 Improve documentation of chrono library 2017-12-03 01:45:11 +01:00
Martchus 85f29adb8a Use full precision for total seconds in TimeSpan::toString 2017-11-29 23:11:26 +01:00
Martchus 3051675bbe Allow conversion of TimeSpan to string with total seconds 2017-11-27 10:25:41 +01:00
Martchus 357ede4ee7 chrono utils: Improve handling micro- and nanoseconds
DateTime and TimeSpan have an accuracy of 100 nanoseconds.

This commit ensures this is also handled in toString() and
fromString() methods and adds relevant convenience methods.
2017-08-31 02:17:05 +02:00
Martchus 3bc9a7b07a Fix handling negative time spans 2017-06-25 16:00:11 +02:00
Martchus 59e20b1043 Apply clang-format 2017-05-01 03:13:11 +02:00
Martchus 12588c6928 Improve chrono utils
- Support parsing/generating ISO time stamp with
  time zone delta
- Fix minor bugs
- Improve tests
2016-08-30 19:59:04 +02:00
Martchus 3c9f95059e added DateTime::fromTimeStampGmt() 2016-01-27 00:14:20 +01:00
Martchus a8f7644350 minor adjustments 2016-01-18 23:41:30 +01:00
Martchus 4d6bf67188 fixed includes 2015-09-06 20:19:09 +02:00
Martchus 603dbf823a fixed includes 2015-09-06 15:30:16 +02:00
Martchus 24ba96a17f First commit 2015-04-22 18:36:40 +02:00