This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Curious about a Duration type #12
Comments
@erlandsona 👋 it looks doable, I will handle this over the weekend :) or you can create a pull request with implementation and I'll be happy to merge it in, let me know! :) |
So I just stuck one of these in my project...
Then to get years I'm using |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm returning a Postgres interval to my client via EctoInterval which serializes a Postgrex.Interval into some Json that looks like
{secs: 0, months: 50, microsecs: 0, days: 25}
... I'd like to be able to serialize that into something I can pass to date-fns/formatDuration.For now I'll make my own Duration record but it'd be nice if this lib had a solution for it 🤷♂️
The text was updated successfully, but these errors were encountered: