Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 684 Bytes

File metadata and controls

11 lines (6 loc) · 684 Bytes

FormattedUTCDate

Displays a date only -- with no time component -- in UTC.

Usage

When you would normally use <FormattedDate> to display a date field interpreted according to the local timezone, <FormattedUTCDate> can instead be used to render it interpreted as UTC -- i.e., showing precisely what is actually stored in the back-end. This is appropriate when recording only a date without an associated time, eg a birthdate. For this, UTC is used both for storage and display, so that the displayed date does not vary when crossing timezones.

Props

The same as those of react-intl's <FormattedDate>.