Closed ghost closed 8 years ago
I would like to thank you for your contribution, but I need to give this thoughts. I'll probably use a prefix that is consistent with with, plus and minus methods, such as delta$unit.
Since neither of the above mentioned methods accepts fractional values, I don't think a difference method should return fractional values.
Well. So what you propose? Can you add something like this? I really need method that can return days between two dates. Thank you!
I'll add support for a duration and a couple of methods to query for duration of time between instants.
$hours = $tm1->delta_hours($tm2); $minutes = $tm1->delta_minutes($tm2); $seconds = $tm1->delta_seconds($tm2); ...
I have released Time::Moment v31 to CPAN, which has a delta_days method.
Nice! Thank you!
Please check: https://github.com/chansen/p5-time-moment/pull/8