Although dayjs is almost a drop-in replacement for moment, they do not support exactly the same date formats. In particular, format('MMM Do') will produce a result like Apr 9th from moment but Apr 9o from dayjs. Format strings of this type need to be replaced by MMM D, which will produce Apr 9 with either library.
Although dayjs is almost a drop-in replacement for moment, they do not support exactly the same date formats. In particular,
format('MMM Do')
will produce a result likeApr 9th
from moment butApr 9o
from dayjs. Format strings of this type need to be replaced byMMM D
, which will produceApr 9
with either library.