Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Feature: Localize timestamps and "time ago" with moment #1227

Merged
merged 2 commits into from Dec 18, 2019

Conversation

funwhilelost
Copy link
Contributor

@funwhilelost funwhilelost commented Dec 18, 2019

This removes the requirement for the internal "timeAgo" calls and human-time - which are both superseded by moment's internal localization. The locale and default timezone are now set globally from main-window.js. This dovetails off of @ahdinosaur 's prior art in #1206 and implements it across the codebase using the user-selected language.

Feature request was originally from: %2fV/5OP/V6ttz5K4YrvUw2TsL/L0W0JEUXX2y/no7U4=.sha256

Changes:
old

To:
new

And for gatherings it now shows:
image

ahdinosaur and others added 2 commits December 18, 2019 11:53
%2fV/5OP/V6ttz5K4YrvUw2TsL/L0W0JEUXX2y/no7U4=.sha256
This removes the internal timeAgo and uses moment's localized fromNow.  It also shows the tooltip timestamp localized as moment.format('LLLL zz') with the chosen language in the settings.  This branches off @ahdinosaurs prior art in #1206 and implements it across the codebase.  Also removes the human-time requirement.
@christianbundy
Copy link
Contributor

Oh wow, what a great PR! I'm very happy to merge this. Thanks a bunch for this improvement!

@christianbundy christianbundy merged commit 740aca4 into master Dec 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants