Whenever I’m passing a date from a website backend to frontend I’ll usually send it inside something like <span> then have JavaScript convert it to a string based on the browser’s localization settings.
So many websites I see for error reporting, etc always throw everything out as UTC and it drives me crazy. It would be nice to just have an HTML tag for ISO-8601 (or even UNIX as done here).</span>
That looks like it’s only useful for machine-readable dates so it wouldn’t be useful for killing off the JavaScript portion of my “hack.” I cry at night for this
Whenever I’m passing a date from a website backend to frontend I’ll usually send it inside something like
<span>
then have JavaScript convert it to a string based on the browser’s localization settings.So many websites I see for error reporting, etc always throw everything out as UTC and it drives me crazy. It would be nice to just have an HTML tag for ISO-8601 (or even UNIX as done here).</span>
Your prayer has been answered! Hear ye:
https://www.w3schools.com/tags/tag_time.asp
That looks like it’s only useful for machine-readable dates so it wouldn’t be useful for killing off the JavaScript portion of my “hack.” I cry at night for this
Looks like my code example glitched here. Basically a an HTML span tag with some CSS class for JavaScript to process.