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

A bit more work on time stamps #720

Closed
wants to merge 2 commits into from
Closed

A bit more work on time stamps #720

wants to merge 2 commits into from

Conversation

AaronVanGeffen
Copy link
Contributor

A bit more work on time stamps. Loads more places to be done, but I thought I'd do these, for now.

…r both relative and absolute time stamps.

Still quite a few places that need to be adjusted (just grep 'standardTime'), but these are the most prominent.
@norv
Copy link
Contributor

norv commented Jul 20, 2013

Merged directly. Thanks!

@StealthWombat
Copy link
Contributor

Awesome. Now we're sure to have them all broken for anyone using IE8 with js disabled. 😀

Honest, non-snarky question here: what benefit do these add? AFAIK, they do nothing for a11y and nothing for SEO.

People seem to assume that they do, but from what I've read it's a myth. In theory, they could offer these advantages, but currently they don't in practice.

@AaronVanGeffen
Copy link
Contributor Author

Actually, no. The default behaviour for 'unknown' HTML tags is inline content, so they'd just see the relative timestamp -- possibly even with the title attribute -- so all's well there.

Added benefit is showing the absolute time as the title tooltip, mainly. The datetime attribute is another added bonus as it can easily be parsed semantically by browsers/crawlers, whereas the title attribute will have fluff like Today/Yesterday, too.

@StealthWombat
Copy link
Contributor

Aha. So it's only unknown block elements that cause problems then. That's not so bad, as long as we aren't trying to style them as inline-block or display: block, but should be ok for time stamps.

@emanuele45 emanuele45 closed this Jul 21, 2013
@@ -1048,7 +1048,7 @@ public function prepareDisplayContext_callback($reset = false)
// Is this user the message author?
$output['is_message_author'] = $message['id_member'] == $user_info['id'];
if (!empty($output['modified']['name']))
$output['modified']['last_edit_text'] = sprintf($txt['last_edit_by'], $output['modified']['time'], $output['modified']['name']);
$output['modified']['last_edit_text'] = sprintf($txt['last_edit_by'], $output['modified']['time'], $output['modified']['name'], $output['modified']['time_full']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

time_full doesn't exist, what should it be instead?
timestamp?

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

Successfully merging this pull request may close these issues.

None yet

4 participants