You-Dont-Need-Momentjs icon indicating copy to clipboard operation
You-Dont-Need-Momentjs copied to clipboard

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

Open ghost opened this issue 5 years ago • 2 comments

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.

ghost avatar Sep 17 '18 06:09 ghost

@xxyuk PR welcome!

stevemao avatar Sep 17 '18 23:09 stevemao

@stevemao PR here #67

ghost avatar Jan 15 '19 03:01 ghost