Javascript UTC Date issue in mobile browsers -
i'm making jquery mobile application , using phone gap deploy multiple platforms. unfortunately, i'm noticing there seems inconsistent behavior between desktop , mobile compatibilities in using javascript's family of utc date functions.
has experienced similar issues android, iphone, , / or blackberry in regard? think it's native browser issue chrome , firefox seem have expected behavior.
the normal usage of:
var d = new date(); var utc_month = d.getutcmonth();
yields int
value desktop browsers , nan
value utc_month on mobile browsers. thoughts? wasn't able find on phonegap exposing datetime native browsers~
the example works fine me on android 2.2 phonegap (after changing 'int utc_month ...' 'var utc_month ...').
do have same typo in code? ran following:
var utc_month = d.getutcmonth(); alert (utc_month);
6 gets alerted.
Comments
Post a Comment