Paul Dicker

Results 312 comments of Paul Dicker
trafficstars

### Creating a duration from the difference between two dates We should have methods to create a `CalendarDate` from the difference between two dates. The methods to do so should...

ISO 8601 specifies two ways to serialize a duration: a default format using designators, and a more familiar format similar to dates and times. Examples: | | designator format |...

Another open problem: clippy warns about integers starting with `0`, which is common in date and time values.

Fixed the clippy warning with help from @Alexendoo in https://github.com/rust-lang/rust-clippy/issues/11472.

- The macro to create a `DateTime` hits the same problem as in https://github.com/chronotope/chrono/pull/1286#issuecomment-1716972437: Rust 1.57 doesn't support making `DateTime::from_naive_utc_and_offset` const. Added a workaround. - We can't easily see whether...

I have separated this into smaller commits. And by creating a temporary `const` inside the macros we can guarantee the values are always checked at compile time.

Updated to remove the rust 1.57 workaround. These macro's can make tests nicer to read. Example commit: https://github.com/chronotope/chrono/commit/8e4092f97acdbced0bd57b16d15e368331ef5af4. They give us parity with one of the selling points of the...

> I think it would be useful to have an initialization macro for `DateTime`. Agreed. But as I understand such a syntax, using a letter after a number, is not...

Found a way to accept a time with fractions of a second using the `stringify` macro! So we can now also do `time!(7:03:15.01)`, and the same for `datetime!()`. @djc What...

We don't support the `/etc/TIMEZONE` file on illumos and Solaris yet, or the invalidation mechanism.