ISO 8601 is hard to read even after reading documentation #341
bidoubiwa
started this conversation in
Feedback & Feature Proposal
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
For the moment a typical duration returned by MeiliSearch looks like this:
Format choice
The format is hard to read. I have a hard time understanding what I'm reading above:
PT0.006734800S
Is it0.006734800
seconds ?The Wikipedia page barely help me understand the format as well. The only passage I found on the subject is the following :
Seconds alternative
The only reasons (for me at least) that you need duration is either looking at it with human eyes, or showcasing it in some way either on terminal or in your app.
Using seconds both are made easy. While using ISO 8601 makes it hard.
Implementation
I did not find a standard library to transform ISO 8601 into seconds. I did find standard libraries to transform ISO 8601 into date time but this is not what we want since we only want to extract seconds.
This requires that in every language I checked the user has to parse the string to extract the
seconds value
Precision
The numbers of digit after the coma seems a bit overkill and makes it even harder to read. I suggest we remove the trailing
0
to lighten the number.Beta Was this translation helpful? Give feedback.
All reactions