@@ -121,7 +121,7 @@ The following specifiers can be used in the custom formats.
121121
122122 formatDate(new Date(2011, 0, 1), "yy"); // 11
123123
124- formatDate(new Date(111, 0, 1), "yyyy"); // 0111
124+ formatDate(new Date(111, 0, 1), "yyyy"); // 0111
125125
126126* ** The ` "Q" ` specifier** &mdash ; Renders a quarter of the year.
127127
@@ -321,6 +321,25 @@ The supported types of options are:
321321
322322 formatDate(new Date(2000, 10, 6), { year: "numeric", month: "long" }); // November 2000
323323
324+ # Splitting date formats
325+
326+ In some cases you may need more detailed information about the format itself in order to utilize or manipulate individual parts of the format.
327+ The ` splitDateFormat ` method can be used to get information about each individual segment of the format.
328+
329+ For example, using abbreviated names in a predefined format can be implemented in the following way.
330+
331+ import { formatDate, splitDateFormat } from '@telerik/kendo-intl';
332+
333+ const date = new Date(2000, 0, 1);
334+
335+ splitDateFormat({ date: 'full' }).map(part => {
336+ if (part.type !== 'literal') {
337+ return formatDate(date, { pattern: part.pattern.slice(0, 3) });
338+ }
339+
340+ return part.pattern;
341+ }).join(''); //Sat, Jan 1, 2000
342+
324343## Suggested Links
325344
326345* [ Date Formatting API] ({% slug dateformatapi_internalization %})
0 commit comments