Hi all,
I was looking at modifying relative_time to support future date/times.
My rationale was:
- use for timers. Lots of template code seems to be used to accomplish the same thing in automations, etc
- avoid confusion by end users. Quite honestly the function should have been called relative_age, and every so often a help thread comes up around this.
I’ve started to look at this, and the base code calls get_age() that appears to be taken from Django.
There’s an alternative in Django called timesince():
I was going to open a PR to put this in core.
Before I began I was wondering:
- will this PR be accepted?
- I was thinking of leaving the function/filter as being named relative_time and including the optional reversed and depth arguments for compatibility. Or should I just create a new function?
- the Django code uses internationalization. Do I need to worry about this?
Thanks,
Rob