canvas-lms/ui/shared/use-date-time-format-hook
Charley Kline d7231da0a0 Make a React hook to make date/time formatting easier
Refs FOO-1263
flag=none

In the interests of using the built-in Intl. features
to format dates and times for i18n, this makes a hook
that just returns a function you can use to create a
formatted date and/or time string. You pass it the standard
Canvas format name (like "date.formats.medium_with_weekday")
and it creates a formatter to match that specification.

Test plan:
* I added it into the Release Notes List component, so look
  at the release notes and they should all have correct dates
  displayed

Change-Id: I91b7fa0f00f05c8f034c45ec89c1f67bfa514964
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266369
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
2021-07-01 21:24:03 +00:00
..
__tests__ Make a React hook to make date/time formatting easier 2021-07-01 21:24:03 +00:00
index.js Make a React hook to make date/time formatting easier 2021-07-01 21:24:03 +00:00
package.json Make a React hook to make date/time formatting easier 2021-07-01 21:24:03 +00:00