4 ms·
You can hover over the date for an exact timestamp. Maybe someone can write a userscript to replace the relative dates to exact ones.
by fngjdflmdflg 2y ago
You can hover over the date for an exact timestamp. Maybe someone can write a userscript to replace the relative dates to exact ones.
- fuzztester 2y agothe point is that you should not need to hover over the dates to get the exact ones. it hinders fast viewing of the data, when it is more than a small amount.
- buzzerbetrayed 2y agoDepends on the application and your personal preference. It's way "faster" for me to see a HN comment was posted "1 hour ago" than it is for me to see the absolute time string and do the math myself. Further, I don't care about the exact time a HN comment was made. I care about roughly how long ago it was posted so I know if the conversation is still going.
- teytra 2y agoBut if exact dates/time is shown you have the possibility to mentally subtract one hour from what the time is, and look for that. With 1 hour/week/month/year you cannot go the other way, it is too vague. But web pages and apps should provide a quick and easy way of changing between the too formats.
- fuzztester 2y agoyes, that's exactly what I said here: https://news.ycombinator.com/item?id=41039675 https://news.ycombinator.com/item?id=41039675
- fuzztester 2y ago>With 1 hour/week/month/year you cannot go the other way, it is too vague. It's not just too vague, it's impossible in general. think about it, first, those who disagree.
- michaelcampbell 2y ago> the point is that you should not need to hover over the dates to get the exact ones. For you. For some, you should not need to hover over exact dates to get humanized relative deltas.
- fuzztester 2y agoso those of us who think differently from you are inhuman? /jk humans from long back, could, and still very much can, easily parse / grok those exact dates and do the trivial date arithmetic needed (just mentally, without even pen and paper, forget a calculator), in seconds, to figure out the deltas nearly perfectly, or at least close enough for their needs. just because you cannot do it, don't think that plenty of others cannot (analogous to what you said to me above). I have interacted with different types and categories of people, of various educational levels and socio-economic backgrounds, from so-called "low" to so-called quite "high", for many years now, and I can tell you that even uneducated farmers, fishermen, bike and car mechanics, and other kinds of manual labourers that I have met and interacted with a good amount, can easily do these kind of calculations in just a few seconds, mentally. not necessarily all, but many of them can.
- xp84 2y agoI’ve never looked at a datetime and thought to myself “if only I knew how long ago that was.” Are there really people like that? And actually, if I saw the date of “2023-12-07,” knowing it was last December actually gives me more information than “eight months ago” — because I know that means around Christmas time last year, and I know what other things happened last December, such as what features we were launching, who the product manager was at the time, etc. If you just shouted a random number of months ago, I would then have to stop and think about the answers to those questions. Lots of my memories could be placed in an approximate month or at least a season, and those never change after the fact. Relative dates are constantly changing and my memory does not increment all its records every month (e.g. “I’ve now worked here 9 months. I’ve now worked here 10 months.” But I can tell you the month and the year I started working here.) Relative dates are definitely a case of “just because we can do this doesn’t mean we should force everyone to use it”
- igorguerrero 2y agoYeah this makes it better, but I've found some sites that don't do that, blogs and news articles where it's impossible to find the date of published... Is it a SEO trick to make your content always relevant?
- reillys 2y agoWell it will definitely help with caching. You only need to update the article every year or so.
- deleted 2y ago[deleted]
- fngjdflmdflg 2y agoThat's still more than just using an exact date that never needs to be updated. Also that seems like something you would do client side anyway. ie. you send a timestamp that never changes and then have the client convert it to "X years/days ago."
- reillys 2y agoMost people render the html on the server side and then you can just cache it wholesale. You could cache the page itself or even the article itself (I'm not talking about browser cache, I'm talking about caching on the web server). The idea being that you don't have to keep rendering or even hitting your DB for the content you just have a html fragment that you create once and cache and then serve. You'll only need to rebuild the content when the date expires so when "one year ago" becomes "two years ago" .
- godshatter 2y agoHuh, I never noticed that. There is a lot of sublety in HN's minimal formatting.
- elashri 2y agoThis bookmarklet (I prefer to do it on purpose, not by default) would do this on a GitHub page. It is easy to convert it to a userscript. javascript:(function () { document.querySelectorAll("relative-time").forEach(function (el) { var p = el.parentNode; var t = el.title; var s = document.createElement("span"); s.innerHTML = t; p.removeChild(el); p.appendChild(s); }); })();
- fngjdflmdflg 2y agoShorter version javascript:(()=> {document.querySelectorAll("relative-time").forEach((el)=> el.format="datetime")})() based on docs at https://github.com/github/relative-time-element https://github.com/github/relative-time-element you can also do other formats like document.querySelectorAll("relative-time").forEach((el)=> {el.format= "datetime"; el.year ="numeric"; el.weekday=undefined;})
- fngjdflmdflg 2y agoshortened version still using <span>, as that has better line wrapping: document.querySelectorAll("relative-time").forEach((el)=>el.replaceWith(document.createElement("span").innerHTML = el.title))
- TylerE 2y agoCan’t hover on mobile
- sva_ 2y agoYou can hover with a pen like the Galaxy S Ultra has. But it doesn't work.