I'm working on migrating from momentjs to dayjs
How to format a custom date format into a standard one using dayjs. For e.g., I'm trying to format a date in YYYY-MM-DD+h:mm format to YYYY-MM-DD. dayjs gives me an NaN
Works perfectly fine with moment this way -
moment(effectiveDate, 'YYYY-MM-DD+h:mm').format('YYYY-MM-DD')
There are lots of such occurrences in my codebase, so I'm trying not to rely on string manipulation to achieve this.
I've been using this repl to try things out