Hey guys,
What would be the date format for the round trip O in nim? (https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings#Roundtrip)
So I can do
let date = parse ("2022-04-25T13:03:28.8936219Z", ???, utc())
Thanks!
Juan
Seconds fractions are not commonly supported or found in the wild, but you can still parse them with my calendar/timestamp/timezone library:
github: https://github.com/treeform/chrono docs: https://nimdocs.com/treeform/chrono/chrono.html#format-specification
import chrono
let cal = parseCalendar(
"{year/4}-{month/2}-{day/2}T{hour/2}:{minute/2}:{second/2}.{secondFraction}Z",
"2022-04-25T13:03:28.8936219Z"
)
echo cal
echo cal.second
echo cal.secondFraction
Just nimble install chrono to get it.