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

Check if date format is valid or not #31

Open
twizzyyanki opened this issue Oct 13, 2015 · 2 comments
Open

Check if date format is valid or not #31

twizzyyanki opened this issue Oct 13, 2015 · 2 comments

Comments

@twizzyyanki
Copy link

Is there any way to check if date format is valid or to check if a formatted date is valid

@arshaw
Copy link
Owner

arshaw commented Oct 13, 2015

you could parse it, and then call valid()

http://arshaw.com/xdate/#Utilities

@twizzyyanki
Copy link
Author

I have a date formatted using this format string "MMMM dS, yyyy". Doing something like this XDate("date generated with format string").valid() returns invalid date. Not so sure why

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