I agree it should do something, which might be configurable by the end user and implementation dependent. For example, a browser might have an option to display the time converted into your preferred time format and time zone. If the operating system environment has some way to specify that some text refers to date/time and can be used with other software in this way, then it would be possible to do that, too.
(My own Scorpion document format is intended to include this capability, as well as the ability to specify other things (e.g. units of measurement, international telephone numbers, how a word is pronounced, languages, etc) to be handled in similar ways, but it is not currently fully defined.)
Wouldn't it make sense if the content of it could be auto-generated as well for the users' locale directly with no need for JS?
Either as a date in the example "4 days ago" or "in 2 days, 2 hours and 28 seconds" for future events. This requires some control for granularity to control for how precise you want it to be and what to omit.
"a few seconds ago", "3 seconds ago", "less than a minute ago".
Should support a shortform that can act as a countdown timer "00:00:56" or "00:56".
Relative times are nice for recent times (e.g. "5 minutes ago" is better than "2025-12-18 13:03"), but they should "decay" into absolute times for anything that isn't fairly recent - like a week or two, perhaps.
I agree with you, I also prefer absolute date stamps, including because it might be printed out, etc. However, the <time> command would allow that to work, if it is implemented in a way that allows that to work.
I like it but I think the granularity needs to be fixed. For example, the cutoff points should be 21+ months -> 2 years instead of 13+ months -> 1 year.
It is particularly annoying in a screenshot or printed document. I rarely print onto paper, but occasionally, I will "print" an interesting blog post into a PDF.
Then write a browser plugin that does these things to the <time> element.
Personally I always use the <time> element when providing date or time. Properly localized with Intl.DateTimeFormat and ISO string formatted in the datetime attribute. I do it mostly because it is free. For a developer writing <time> instead of <span> makes no difference. <time> is easier to target in tests, and maybe my users has a browser plugin that can quickly e.g. add a thing to their day planner app from a <time> element.
I agree it should do something, which might be configurable by the end user and implementation dependent. For example, a browser might have an option to display the time converted into your preferred time format and time zone. If the operating system environment has some way to specify that some text refers to date/time and can be used with other software in this way, then it would be possible to do that, too.
(My own Scorpion document format is intended to include this capability, as well as the ability to specify other things (e.g. units of measurement, international telephone numbers, how a word is pronounced, languages, etc) to be handled in similar ways, but it is not currently fully defined.)
Take a look at GitHub’s <relative-time> element - works great as a progressive enhancement: https://github.com/github/relative-time-element
Wouldn't it make sense if the content of it could be auto-generated as well for the users' locale directly with no need for JS?
Either as a date in the example "4 days ago" or "in 2 days, 2 hours and 28 seconds" for future events. This requires some control for granularity to control for how precise you want it to be and what to omit.
"a few seconds ago", "3 seconds ago", "less than a minute ago".
Should support a shortform that can act as a countdown timer "00:00:56" or "00:56".
It's wild to me that it doesn't even generate a tooltip by default.
Similar gripe of mine, why doesnt input `datetime-local` add the timezone on the client side...
Tooltips are struggling on mobile.
It has done nothing for so long that it may now be impossible to make it do something useful.
> Post published 4 hours ago
Am I the only one who dislikes these relative times and prefers absolute date stamps?
Especially "1 year ago" (for something that was 23 months ago)
Relative times are nice for recent times (e.g. "5 minutes ago" is better than "2025-12-18 13:03"), but they should "decay" into absolute times for anything that isn't fairly recent - like a week or two, perhaps.
I agree with you, I also prefer absolute date stamps, including because it might be printed out, etc. However, the <time> command would allow that to work, if it is implemented in a way that allows that to work.
I like it but I think the granularity needs to be fixed. For example, the cutoff points should be 21+ months -> 2 years instead of 13+ months -> 1 year.
It is particularly annoying in a screenshot or printed document. I rarely print onto paper, but occasionally, I will "print" an interesting blog post into a PDF.
Then write a browser plugin that does these things to the <time> element.
Personally I always use the <time> element when providing date or time. Properly localized with Intl.DateTimeFormat and ISO string formatted in the datetime attribute. I do it mostly because it is free. For a developer writing <time> instead of <span> makes no difference. <time> is easier to target in tests, and maybe my users has a browser plugin that can quickly e.g. add a thing to their day planner app from a <time> element.