Thank you for sharing your code on the CPAN.
I like your module, but not the naming.
For somebody who doesn't know the js library it was inpired from, the name is mostly meaningless, and not something one would search for.
Since DateTime::Format::Human::Duration exists, maybe use DateTime::Format::Fuzzy::Duration instead? Or if you don't want to rewrite it as a ::Format module, use DateTime::Duration::Fuzzy
Regarding the API, I think it would make sense to all the user to pass in DateTime::Duration objects, not only DateTime objects.
Finally you can replace the get_datetime_from_timestamp function with DateTime->from_epoch( epoch => $your_time_stamp).
|