you-dont-need/You-Dont-Need-Momentjs

Day.js also support token 'Do' e.g. 9th

Open

#30 建立於 2018年9月17日

在 GitHub 查看
 (2 留言) (3 反應) (0 負責人)JavaScript (314 fork)batch import
PR Welcomehelp wanted

倉庫指標

Star
 (13,223 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Day.js has a plugin advancedFormat that allows tokens like Do Q X

// current readme 
dayjs().format('dddd, MMMM D YYYY, h:mm:ss A');
// => "Sunday, September 9 2018, 7:12:49 PM" ⚠️  not support 9th

// however with plugin
import advancedFormat from 'dayjs/plugin/advancedFormat'
dayjs.extend(advancedFormat)
dayjs().format('Q Do k kk X x')

Besides, we might could update the screenshot and the description of this great project. Since it's not just the comparison between moment.js and date-dns, also Day.js and native Date object.

貢獻者指南