Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider rendering dates/times in HTML time tags #12

Open
3noch opened this issue Aug 19, 2016 · 5 comments
Open

Consider rendering dates/times in HTML time tags #12

3noch opened this issue Aug 19, 2016 · 5 comments

Comments

@3noch
Copy link

3noch commented Aug 19, 2016

HTML5 has a time tag that's meant to represent dates and times semantically. It is better for indexing and accessibility. But it's also convenient for hiding machine-readable formats in the datetime attribute and displaying it differently.

<time datetime="20160309T130222.3022Z">March 9th</time>
@3noch
Copy link
Author

3noch commented Aug 19, 2016

If we took this route it could be nice to have an easy way to add HTML classes to these time elements so that we can auto-localize them on the client side.

@rsyring
Copy link
Member

rsyring commented Aug 19, 2016

FWIW, this would require the assumption that webgrid was getting rendered in HTML5. Maybe a safe bet these days, but just keep that in mind.

@rsyring
Copy link
Member

rsyring commented Aug 19, 2016

Actually, not a safe bet for RRS.

@3noch
Copy link
Author

3noch commented Aug 19, 2016

Sure. It could be opt-in/opt-out/whatever.

@3noch
Copy link
Author

3noch commented Aug 19, 2016

Also, I doubt it actually matters what version of HTML you're "using" since HTML is intentionally unversioned from a browser's perspective: http://stackoverflow.com/questions/20516803/is-it-possible-to-use-html5-elements-with-old-html4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants