chrono
chrono copied to clipboard
⏰ Add `td_*seconds` serde `Serialize` and `Deserialize` functions for `TimeDelta`
Fixes https://github.com/chronotope/chrono/issues/117
This PR copy-pastes the current implementation for DateTime such that we have equal implementations for DeltaTime.
I opted to add the logic to the existing serde.rs file. However, I think this might be the wrong place and a better solution would be to move the main.rs's serde module combined with this serde.rs file to a separate src/serde.rs file, thoughts?
PS: I am just doing a drive-by PR on this crate, so I don't really know what the exact requirements are regarding testing ect. Please let me know!