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
@@ -102,35 +107,35 @@ The following specifiers can be used in the custom formats.
102
107
103
108
For the abbreviated name, use one to three letters. For the wide name, use four letters. For the narrow name, use five letters.
104
109
105
-
import { formatDate } from '@telerik/kendo-intl';
110
+
import { formatDate } from '@telerik/kendo-intl';
106
111
107
-
formatDate(new Date(2000, 0, 1), "y G"); // 2000 AD
112
+
formatDate(new Date(2000, 0, 1), "y G"); // 2000 AD
108
113
109
114
***The `"y"` specifier**—Renders the year.
110
115
111
116
To render the full year, use one letter. To render a two-digit year, use two letters. To render a zero-padded year, if necessary, use three or four letters.
112
117
113
-
import { formatDate } from '@telerik/kendo-intl';
118
+
import { formatDate } from '@telerik/kendo-intl';
114
119
115
-
formatDate(new Date(2000, 0, 1), "y"); // 2000
120
+
formatDate(new Date(2000, 0, 1), "y"); // 2000
116
121
117
-
formatDate(new Date(2011, 0, 1), "yy"); // 11
122
+
formatDate(new Date(2011, 0, 1), "yy"); // 11
118
123
119
-
formatDate(new Date(111, 0, 1), "yyyy"); // 0111
124
+
formatDate(new Date(111, 0, 1), "yyyy"); // 0111
120
125
121
126
***The `"Q"` specifier**—Renders a quarter of the year.
122
127
123
128
For the numerical quarter, use one or two letters. For the abbreviation, use three letters. For the wide name, use four letters. For the narrow name, use five letters.
***The `"q"` specifier**—The same as the `"Q"` specifier except that the `"q"` specifier uses the standalone names.
136
141
@@ -140,151 +145,151 @@ The following specifiers can be used in the custom formats.
140
145
141
146
When you use two letters, the month number is rendered as zero-padded.
142
147
143
-
import { formatDate } from '@telerik/kendo-intl';
148
+
import { formatDate } from '@telerik/kendo-intl';
144
149
145
-
formatDate(new Date(2000, 0, 1), "M"); // 1
150
+
formatDate(new Date(2000, 0, 1), "M"); // 1
146
151
147
-
formatDate(new Date(2000, 0, 1), "MM"); // 01
152
+
formatDate(new Date(2000, 0, 1), "MM"); // 01
148
153
149
-
formatDate(new Date(2000, 0, 1), "MMM"); // Jan
154
+
formatDate(new Date(2000, 0, 1), "MMM"); // Jan
150
155
151
-
formatDate(new Date(2000, 0, 1), "MMMM"); // January
156
+
formatDate(new Date(2000, 0, 1), "MMMM"); // January
152
157
153
-
formatDate(new Date(2000, 0, 1), "MMMMM"); // J
158
+
formatDate(new Date(2000, 0, 1), "MMMMM"); // J
154
159
155
160
***The `"L"` specifier**—The same as the `"M"` specifier except that the `"L"` specifier uses the standalone names.
156
161
157
162
***The `"d"` specifier**—Renders the day of the month.
158
163
159
164
To show the minimum number of digits, use `"d"`. To always show two digits, use `"dd"` (zero-padding, if necessary—for example, "08").
160
165
161
-
import { formatDate } from '@telerik/kendo-intl';
166
+
import { formatDate } from '@telerik/kendo-intl';
162
167
163
-
formatDate(new Date(2000, 0, 1), "y d"); // 2000 1
168
+
formatDate(new Date(2000, 0, 1), "y d"); // 2000 1
164
169
165
-
formatDate(new Date(2000, 0, 1), "y dd"); // 2000 01
170
+
formatDate(new Date(2000, 0, 1), "y dd"); // 2000 01
166
171
167
172
***The `"E"` specifier**—Renders the day of the week.
168
173
169
174
For the abbreviated day name, use one through three letters. For the wide name, use four letters. For the narrow name, use five letters. For the short name, use six letters.
***The `"e"` specifier**—The same as the `"E"` specifier except that it adds a numeric value that depends on the local starting day of the week, using one or two letters. The format requires you to load the supplemental `weekData`.
182
187
183
-
import { formatDate } from '@telerik/kendo-intl';
188
+
import { formatDate } from '@telerik/kendo-intl';
184
189
185
-
formatDate(new Date(2000, 0, 1), "e"); // 7
190
+
formatDate(new Date(2000, 0, 1), "e"); // 7
186
191
187
192
***The `"c"` specifier**—The same as the `"e"` specifier except that uses the standalone names.
188
193
189
194
***The `"a"` specifier**—Renders the day period.
190
195
191
196
For the short name, use one through three letters. For the wide name, use four letters. For the narrow name, use five letters.
***The `"Z"` specifier**—Renders the timezone.
262
267
263
268
To show the ISO8601 basic format with hours and minutes, use one through three letters. For the long localized GMT format, use four letters. For the ISO8601 extended format, use five letters.
***The `"X"` specifier**—Renders the timezone.
274
279
275
280
For the ISO8601 basic format with hours and optional minutes, use one letter. For the ISO8601 basic format with hours and minutes, use two letters and four letters. For the ISO8601 extended format, use three and five letters.
276
281
277
282
When the local time offset is `0` (zero), use the ISO8601 UTC indicator `Z`.
278
283
279
-
import { formatDate } from '@telerik/kendo-intl';
284
+
import { formatDate } from '@telerik/kendo-intl';
280
285
281
-
formatDate(new Date(2000, 0, 1), "X"); // +02
286
+
formatDate(new Date(2000, 0, 1), "X"); // +02
282
287
283
-
formatDate(new Date(2000, 0, 1), "X"); // Z if zero offset
288
+
formatDate(new Date(2000, 0, 1), "X"); // Z if zero offset
***The `"x"` specifier**—The same as the `"X"` specifier except that the `"x"` specifier does not add the UTC indicator when the offset is `0` (zero).
290
295
@@ -296,25 +301,25 @@ The supported types of options are:
296
301
297
302
***Locale predefined formats**—Sets the format from the [`dateFormats`](http://www.unicode.org/reports/tr35/tr35-dates.html#dateFormats), [`timeFormats`](http://www.unicode.org/reports/tr35/tr35-dates.html#timeFormats), and [`dateTimeFormats`](http://www.unicode.org/reports/tr35/tr35-dates.html#dateTimeFormats) elements of the calendar.
formatDate(new Date(2000, 10, 6, 13), { datetime: "full" }); // Monday, November 6, 2000 at 1:00:00 PM GMT+02:00
310
+
formatDate(new Date(2000, 10, 6, 13), { datetime: "full" }); // Monday, November 6, 2000 at 1:00:00 PM GMT+02:00
306
311
307
312
***Skeleton formats**—Sets the format from the [`availableFormats`](http://www.unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems) of the calendar based on the date fields that you want to display.
***Fields formats**—Similar to the skeleton formats except that you need to set the required fields by using separate options in the same way as the [`Intl.DateTimeFormat`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat) object.
0 commit comments