Created
October 17, 2017 08:29
-
-
Save yakirn/0055b51af60cdca1b7ff47ca1cad61cf to your computer and use it in GitHub Desktop.
Intl API react date format example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function DateFormatter(props, context) { | |
return ( | |
<div>{props.date.toLocaleString(context.locale, { year: 'numeric', month: 'short', day: 'numeric' })}</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment