Skip to main content

isValid

function isValid(): boolean

Checks if the contained date is valid. If an incorrect type is passed to a function, the date may become invalid without warning. Be careful!

const invalid = new Chronosis('some random string')
// Returns false.
invalid.isValid()