Open robertvanhoesel opened 7 months ago
In an ideal world, the solution would apply to relative time as well which would get autorefreshed as time goes on (1 minute ago -> 2 minutes ago)
Hmm yeah probably we should just extend/rewrite to a <Date>
component which:
Possible library to use https://www.npmjs.com/package/local-time
Not needed. Also a ruby gem? 😅
Create an Astro component that takes the UTC Date as argument and client side properly formats the date in local timezone. Note that Astro, doing Server Side Rendering too, will print the server time too. We need to think about a subtle way of updating the DOM.
Reference TimeAgo.astro for similar code.