-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add years and months to the human date formatter #425
base: master
Are you sure you want to change the base?
Conversation
I'm not quite sure what the error in the CICD is about 🤔
|
Thanks for your contribution! Days, minutes, hours, and seconds have a more or less constant value, unlike months and years which can have different lengths (notwithstanding that we have them in Numbat as average values), so I think we might want to think twice about adding them to |
Also, please note that we have an open PR targeting |
This test makes sure that all modules can be used in a standalone way. You can reproduce the error in the following way: start numbat with the |
Yeah, I do think it makes sense considering those units already exist in numbat (and the documentation does have proper warnings about them being average value). To me As a side note on the subject, I was wondering if, for durations greater than a month, it would be more ergonomic to hide the hours, minutes and seconds, as
I added the management of the negative time to this pull request (I have used
Yep, thanks, I solved it ^^ |
I'm not completely sure about this. As @triallax mentioned, I'm with you (@ValentinLeTallec) that we're often just interested in a rough estimation. But in this case, I can already call We may want to have that same feature (split a time span into mixed units) for years/months/days as well, but then the imprecision bothers me. |
This comment was marked as duplicate.
This comment was marked as duplicate.
Yeah, it does make sens to keep precise measurements for the use case you are describing. I think the current version is more geared toward a My use case would be more something like :
Maybe we could separate it in two functionalities ? |
But in this exact use case, the imprecision actually bothers me. I don't want this to be off by 1 day. |
Then maybe more like that :
? |
Hi, the current implementation of the
human
formatter uses days as its biggest unit, I added years and monthsBefore :
After :
P.S Love numbat ^^