jalaali / moment-jalaali

A Jalaali (Jalali, Persian, Khorshidi, Shamsi) calendar system plugin for moment.js.
MIT License
937 stars 162 forks source link

ios #189

Open alirezafarahaniii opened 5 years ago

alirezafarahaniii commented 5 years ago

hi it's working on all platforms except iPhone!! what should I do?

behrang commented 5 years ago

What is it that does not work?

Provide more data and an example.

alirezafarahaniii commented 4 years ago

What is it that does not work?

Provide more data and an example.

for example, displayed time in ios(i mean in my application not phone clock.phone clock is right) is 11:15 but in other platforms is 14:45.it seems +3:30 doesn't work on ios!

alitaheri commented 4 years ago

@alirezafarahaniii are you sure the string you're passing to moment adheres to ISO 8601?

That means, make sure the offset is provided, if not the append Z. otherwise some platforms will parse in UTC while others will parse in local timezone:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#Timestamp_string

alirezafarahaniii commented 4 years ago

@alirezafarahaniii are you sure the string you're passing to moment adheres to ISO 8601?

That means, make sure the offset is provided, if not the append Z. otherwise, some platforms will parse in UTC while others will parse in local timezone:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#Timestamp_string

this is date That I pass to moment jalaali =>2019-11-13T07:05:00.000+0000

Error:invalid Jalaali year-100721

alirezafarahaniii commented 4 years ago

What is it that does not work?

Provide more data and an example.

this is date That I pass to moment jalaali =>2019-11-13T07:05:00.000+0000

Error:invalid Jalaali year-100721