Skip to content

Translations for Dates #1584

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

Closed
oruburos opened this issue Aug 27, 2020 · 0 comments · Fixed by #1605 · May be fixed by ceciliahollins/p5.js-web-editor#12
Closed

Translations for Dates #1584

oruburos opened this issue Aug 27, 2020 · 0 comments · Fixed by #1605 · May be fixed by ceciliahollins/p5.js-web-editor#12

Comments

@oruburos
Copy link
Collaborator

oruburos commented Aug 27, 2020

  • Existing feature enhancement

At this moment translations in the Client-Side for dates are not provided
The dates functionality is provided by

import differenceInMilliseconds from 'date-fns/difference_in_millisecond';
import distanceInWordsToNow from 'date-fns/distance_in_words_to_now';

date-fns has an own way to use locales, but they need to be declared (and present) before use (no fetching based on current language)

Feature enhancement details:

  • Create a custom wordstonow function to extend current functionality for the case where the saved date is bigger than 35 seconds
  • Analyze the tradeoff of importing all the date-fns in advance for use dates in the different languages vs custom solution vs different library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants