dayjs icon indicating copy to clipboard operation
dayjs copied to clipboard

moment.creationData() replacement ?

Open sunry81914 opened this issue 3 years ago • 1 comments

I want to get the format of a dayjs instance. Is there a similar method like creationDate() provided by moment?

moment("2013-01-02", "YYYY-MM-DD", true).creationData() === {
    input: "2013-01-02",
    format: "YYYY-MM-DD",
    locale: Locale obj,
    isUTC: false,
    strict: true
}

sunry81914 avatar May 12 '22 04:05 sunry81914

a dayjs object just does not have this information. The only item is 'isUTC' that can be acquired by using the corresponding function from the utc plugin (dayjs.utc().isUTC()) and the locale name that can be found with dayjs.locale() (e.g. resulting in 'en')

BePo65 avatar Jun 03 '22 04:06 BePo65