time_difference
time_difference copied to clipboard
Add an in_calendar_months feature
This adds a method that does a more "human" calculation of months, taking into account calendar time in the current timezone (so you always get an integer number of months and the 4th of the month to the 4th of the month is always 1 month).
It doesn't touch in_components or in_general and it could probably be refactored slightly to be a shorter method, but it does the job I need!
Let me know what you think or if you'd like me to change anything.
I'm also interested in methods like in_calendar_years
. Maybe, this can be an option, like in_years(calendar: true)
, in_months(calendar: true)
and even in_general(calendar: true)
.
For note: there is the fork with such methods: https://github.com/IQTHINK/time_difference
no updates on this?