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

parse error #40

Closed
SudoDios opened this issue Nov 27, 2020 · 2 comments
Closed

parse error #40

SudoDios opened this issue Nov 27, 2020 · 2 comments
Labels

Comments

@SudoDios
Copy link

error when parsing

string date = "1399/09/07";
PersianDate persianDate = persianDateFormat.parse(date,"Y/m/d");

error message
java.lang.ArrayIndexOutOfBoundsException: length=13; index=-1

@samanzamani
Copy link
Owner

samanzamani commented Nov 29, 2020

Hi
Look at PersianDateFormat in the documentation.
For parse, you must use YYYY for the year, MM for the month, and dd for the day.

string date = "1399/09/07";
PersianDate persianDate = persianDateFormat.parse(date,"YYYY/MM/dd");

@SudoDios
Copy link
Author

hello,
thank you.
👍

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

No branches or pull requests

2 participants