Format Date as “yyyy-MM-dd'T'HH:mm:ss.SSS'Z'”

后端 未结 5 556
囚心锁ツ
囚心锁ツ 2021-02-02 05:49

I need to format a date as yyyy-MM-dd\'T\'HH:mm:ss.SSS\'Z\' as specified by Parse\'s REST API for Facebook. I was wondering what the most lightweight

5条回答
  •  北海茫月
    2021-02-02 06:08

    Add another option, maybe not the most lightweight.

    dayjs.extend(dayjs_plugin_customParseFormat)
    console.log(dayjs('2018-09-06 17:00:00').format( 'YYYY-MM-DDTHH:mm:ss.000ZZ'))
    
    

提交回复
热议问题