Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate date - get date diff #3

Open
merajseraji opened this issue Oct 12, 2022 · 1 comment
Open

validate date - get date diff #3

merajseraji opened this issue Oct 12, 2022 · 1 comment

Comments

@merajseraji
Copy link

merajseraji commented Oct 12, 2022

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?

@merajseraji merajseraji changed the title validate date validate date - get date diff Oct 12, 2022
@SaeedDev94
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants