You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Result: `<span>27 de fev de 2015 11:17:10</span>` when using the `pt` (Portuguese) locale.
112
+
```js
113
+
<FormatDate options={{datetime:"medium"}}>
114
+
{newDate()}
115
+
</FormatDate>
116
+
// Which would render:
117
+
// <span>Feb 27, 2015, 11:17:10 AM</span> when using the `en` (English) locale, or
118
+
// <span>27 de fev de 2015 11:17:10</span> when using the `pt` (Portuguese) locale.
119
+
```
102
120
103
121
### FormatMessage
104
122
@@ -109,63 +127,60 @@ It allows for the creation of internationalized messages (as defined by the [ICU
109
127
110
128
#### Children
111
129
112
-
String or array path to traverse a set of messages store in JSON format. Required.
130
+
Required unless the `path` property is set. It's a string with the default message. Either this or the `path` property is required.
113
131
114
132
#### Props
115
133
116
-
-**path** - required
117
-
- String or array path to traverse a set of messages store in JSON format
134
+
-**path** - required unless children is set
135
+
- String or array path to traverse a set of messages store in JSON format. Defaults to the message itself defined by the children.
118
136
-**variables** - optional
119
137
- An array (where variables are represented as indeces) or object (for named variables) which contains values for variable replacement within a message.
120
138
-**locale** - optional
121
139
- A string value representing the locale (as defined by BCP47) used to override the default locale (preferred) set by your application using `Globalize.locale(locale)` when formatting the amount.
0 commit comments