1

I have a javascript code:

newDate: function(days) {
    var newDate = new Date( parseInt(startDate) + 1*1000*3600);

    var date = newDate .getDate();
    return date ;
},

Seems like this is the part of the program that produces different results on Android and iOS. All the rest data is the same. How can it produce different results on Android vs iOS?

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
Haradzieniec
  • 9,086
  • 31
  • 117
  • 212

1 Answers1

3

The Date constructor is only consistent cross-browser for the following Date formats:

"2010"

"2010-06"

"2010-06-09"

"2010-06-09T15:20:00Z"

"2010-06-09T15:20:00-07:00"

"2010/06/09"

"2009/6/9"

"2010/6/9 12:34"

"2010/6/9 12:34:56"

"June 9, 2010"

"2010 June 9"

References

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265