Closed erfanatp closed 1 year ago
Support for calendars other than Gregorian and ISO week is limited to formatting, they cannot be used for parsing. See the documentation on Output calendars. In your second example the year is parsed as a gregorian year.
@diesieben07 is correct
Describe the bug Assume this code, works fine for converting a "fr" year to a "fa" year.
The "۱۳۸۱" in Persian means: 1381, exactly 20 years ago (This year is 1401 in the Persian calendar) Let's see the same approach for the Persian calendar:
As you see, the reverse way returns 1381(which means 641 years ago!!!). It seems it can't convert the Persian year to the Gregorian year.
"خرداد 04 1381"
is correct, but because of rtl-ltr problem you see the month name (خرداد
) at the end of the string. But it's in the first position. Otherwise, we would have gotten anInvalid DateTime
error.Tested on: