@everymundo/date-utils
v1.6.0
Published
## toUTCDateString Returns the year-month-date from a date object ```js const date = new Date('2023-01-01T20:23:01.001Z')
Downloads
10
Maintainers
Keywords
Readme
@everymundo/date-utils
toUTCDateString
Returns the year-month-date from a date object
const date = new Date('2023-01-01T20:23:01.001Z')
const res = dateUtils.toUTCDateString(date)
expect(res).to.equal('2023-01-01')
isValidDate
Checks if a given value is a valid instance of Date
const date = new Date('2023-01-01T20:23:01.001Z')
const res = dateUtils.isValidDate(date)
expect(res).to.be.true