SaeedDev94 / jalali-ts

Parse and interact with jalali date
MIT License
19 stars 1 forks source link

validate date - get date diff #3

Open merajseraji opened 2 years ago

merajseraji commented 2 years ago

how can I validate the date via this package? for example in moment-jalali we should do this as you know: moment(value, 'jYYYY/jMM/jDD').isValid()

or

how can I get the date difference?

SaeedDev94 commented 2 years ago

For validating a jalali date you can use:
Utils#(year: number, month: number, date: number[, hours: number, minutes: number, seconds: number, ms: number])

For date difference: you can get js native Date: jalali.date