Skip to content

Conversation

aalhendi
Copy link

This PR begins to address #298.

src/fmt/friendly/printer.rs

  • Introduces jiff::fmt::friendly::SpanPrinter::print_unsigned_duration method which accepts as core::timeDuration as UnsignedDuration, converts to a SignedDuration and reuses the existing print_duration method.

src/fmt/serde.rs

  • Add module jiff::fmt::serde::unsigned_duration to house serde helpers for core::time::Duration
    • jiff::fmt::serde::unsigned_duration::friendly::compact holds required and optional serialization functions. Similar to jiff::fmt::serde::duration::friendly::compact
    • jiff::fmt::serde::unsigned_duration::deserialize holds required and optional deserializers.

@aalhendi aalhendi force-pushed the aalhendi/std-duration-helpers branch from 097b61a to 1060498 Compare May 23, 2025 12:34
@aalhendi aalhendi force-pushed the aalhendi/std-duration-helpers branch from 1060498 to b4b3c64 Compare May 23, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant