Crates.io | iso8601_interval |
lib.rs | iso8601_interval |
version | 0.3.0 |
source | src |
created_at | 2023-03-29 23:24:52.856343 |
updated_at | 2023-07-22 16:41:08.644879 |
description | Parses ISO8601 time intervals. |
homepage | https://github.com/PowerSnail/iso8601_interval |
repository | https://github.com/PowerSnail/iso8601_interval |
max_upload_size | |
id | 824514 |
size | 20,805 |
It is a small addition to the chrono
crate, parsing ISO 8601 time interval 1 into [IsoInterval
] which contains a pair of DateTime
objects, that respectively mark the
beginning and end of the interval.
This utility is missing in chrono
possibly due to the fuzziness of duration, which can be specified against year and month, so the time passed is inherently not absolute.
Interval is absolute in that regard, because when a starting or end point is fixed, the exact number of seconds passed can be calculated.
The dates, as parsed, are in FixedOffset
time zone, and can be switched out by calling [IsoInterval::with_time_zone
].