mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 15:19:58 +08:00
5e298dba51
* add responsive property to carousel (#15071) * add responsive property to carousel #15065 * extend carousel props from Slick type definitions #15065 * rm key in OptionProps (#15104) * update doc * fix cascader should tab twice to exist (#15117) * fix cascader should tab twice to exist * update snapshot * Drawer Body padding should be variable * fix DatePicker to support an array of formats (#15116) ref #13148 * table reader mobile friendly * up * up * doc: add 3.14.0 changelog * doc: fix ci warning * doc: fix ci warning * doc: fix typo * doc: fix ci warning * doc: fix ci warning * doc: fix cr warring * doc: fix cr warring * doc: fix cr warring * doc: fix cr warring * doc: fix cr warring * doc: fix cr warring * doc: fix cr warring * -m * -m * doc: fix cr warning
12 lines
294 B
TypeScript
12 lines
294 B
TypeScript
import * as moment from 'moment';
|
|
|
|
export function formatDate(value: moment.Moment | undefined | null, format: string | string[]): string {
|
|
if (!value) {
|
|
return '';
|
|
}
|
|
if (Array.isArray(format)) {
|
|
format = format[0];
|
|
}
|
|
return value.format(format);
|
|
}
|