canvas-lms/app/jsx/profiles
Charley Kline 048ec11b63 Start using Intl for I18n formatting
Closes FOO-1155
flag=none

Now that browser Intl support is common, we want to try to
start using it instead of things like moment.js for
internationalization of number and time formatting.

Creates a helper function to express relative time distances
(i.e. "5 days from now") which Intl.RelativeTimeFormat only
partially implements.

Creates a helper function to polyfill Intl functions for Jest
tests, since node.js currently does not implement them.

As a proof of concept, rolled all of that into the QRMobileLogin
component, which is now free of moment.js!

Test plan:
* You like the helper functions I added, especially the polyfill
* QRMobileLogin component still works fine

Change-Id: I3e31e788f8f5fb1312fba9f05815372ddcd1ae08
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251518
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-10-30 16:46:50 +00:00
..
__tests__ Start using Intl for I18n formatting 2020-10-30 16:46:50 +00:00
GeneratePairingCode.js Fix up all <Spinner> import locations 2020-06-29 20:09:49 +00:00
QRMobileLogin.js Start using Intl for I18n formatting 2020-10-30 16:46:50 +00:00