Talking with Pandos reminded me that I needed to open a topic about this.
So, a few weeks ago, I wrote a quick, rough implementation of relative dates for Wedge. They behave like in Facebook or other 'modern' software, or, closer to us, ElkArte. I wanted pages to validate, and still use valid semantic tags, so I adopted the time tag, and used DATE_W3C as the datetime format, it's longer but more 'solid', and takes timezones into account.
At that point, I had: <time datetime="w3c valid date">Absolute date</time>
Okay.
I used JS to transform absolute dates to relative dates, and it's pretty neat and tidy. I'm happy with it.
But JS has this tiny little problem: it doesn't execute immediately (whatever you may think), and as such, the browser first shows the page with absolute dates, then executes the JS, and replaces dates with relative dates.
The problem is that I didn't realize this because I usually do page reloads, and Chrome is smart enough to execute the JS ASAP and thus I never see the absolute dates. However, if I simply move to a new page, I can see the absolute dates for a split second. I don't like that.
The solution would be to then use relative dates right in the HTML, but what if I want to know the exact date a message was posted at..? I'll have to keep it in a title tag (when right now, the title tag is generated on the fly from the contents of the time tag. Smart enough.) So, that makes this kind of line: <time datetime="w3c valid date" title="Absolute date">Relative date</time>
And, believe me, I think it's wayyyy overkill just for providing an accessible way of getting a relative date. I was already unsure about committing my HTML/JS work with the first version, but this one... Well, it's just not cool.
Not only that, but what if the user likes absolute dates better? Oh, well, I guess I can then simply change the HTML I'm printing out, I guess... I can wrap it up inside a small helper function, provide it a timestamp and then expect Wedge to do all the work for me. Okay, I'm okay with that. I can do that. The only thing I'm not looking forward to, is adding the UI for it, even if it's simple, because I'm rather remove user options than add them, but well, I think it's something that polarizes users more than "number of topics per page", I'd say.
But the extra length of time tags, I'm not sure it's worth it... :-/
So, two questions... Do you like absolute or relative dates better, and do you think it's all worth implementing (considering if I do, I'll add a setting to let you choose your preference)?
Also, when it comes to relative dates, how far away (ago?) do you think it's worth reverting back to absolute dates? I'm not exactly the kind of guy who enjoys seeing a "6 years ago" date. I prefer to see "May 2007", but maybe that's just me. I also don't like seeing "3 months ago" either, but I'm fine with "5 days ago", so... I guess it's a fair question.
PS: oh, another one... I also think it'd be really cool to see "5 days ago at 8:54" rather than just "5 days ago". Oddly, I've never seen this kind of implementation, anywhere...
So, a few weeks ago, I wrote a quick, rough implementation of relative dates for Wedge. They behave like in Facebook or other 'modern' software, or, closer to us, ElkArte. I wanted pages to validate, and still use valid semantic tags, so I adopted the time tag, and used DATE_W3C as the datetime format, it's longer but more 'solid', and takes timezones into account.
At that point, I had: <time datetime="w3c valid date">Absolute date</time>
Okay.
I used JS to transform absolute dates to relative dates, and it's pretty neat and tidy. I'm happy with it.
But JS has this tiny little problem: it doesn't execute immediately (whatever you may think), and as such, the browser first shows the page with absolute dates, then executes the JS, and replaces dates with relative dates.
The problem is that I didn't realize this because I usually do page reloads, and Chrome is smart enough to execute the JS ASAP and thus I never see the absolute dates. However, if I simply move to a new page, I can see the absolute dates for a split second. I don't like that.
The solution would be to then use relative dates right in the HTML, but what if I want to know the exact date a message was posted at..? I'll have to keep it in a title tag (when right now, the title tag is generated on the fly from the contents of the time tag. Smart enough.) So, that makes this kind of line: <time datetime="w3c valid date" title="Absolute date">Relative date</time>
And, believe me, I think it's wayyyy overkill just for providing an accessible way of getting a relative date. I was already unsure about committing my HTML/JS work with the first version, but this one... Well, it's just not cool.
Not only that, but what if the user likes absolute dates better? Oh, well, I guess I can then simply change the HTML I'm printing out, I guess... I can wrap it up inside a small helper function, provide it a timestamp and then expect Wedge to do all the work for me. Okay, I'm okay with that. I can do that. The only thing I'm not looking forward to, is adding the UI for it, even if it's simple, because I'm rather remove user options than add them, but well, I think it's something that polarizes users more than "number of topics per page", I'd say.
But the extra length of time tags, I'm not sure it's worth it... :-/
So, two questions... Do you like absolute or relative dates better, and do you think it's all worth implementing (considering if I do, I'll add a setting to let you choose your preference)?
Also, when it comes to relative dates, how far away (ago?) do you think it's worth reverting back to absolute dates? I'm not exactly the kind of guy who enjoys seeing a "6 years ago" date. I prefer to see "May 2007", but maybe that's just me. I also don't like seeing "3 months ago" either, but I'm fine with "5 days ago", so... I guess it's a fair question.
PS: oh, another one... I also think it'd be really cool to see "5 days ago at 8:54" rather than just "5 days ago". Oddly, I've never seen this kind of implementation, anywhere...