javascripttizen-web-apppersian-calendarsamsung-gear-s2

Different result with same js code on pc and tizen converting date from gregorian to persian


I have a js method that converts system's gregorian date to jalali (persian) date.

Though it's working correctly on pc and all my websites, the result on tizen watch face that uses javascript on its web layout have become invalid since july 1st. I mean the result is 1 day more than what it should be.

I know it's a leap year and the code handles it fine...

I have replaced the convert code with another sample and it's just the same.

Does anybody else have this problem or know about what the solution might be?

Is there any difference between js on pc and tizen device?


Solution

  • I should say that it was my fault and it was wrong function input when calling convert function. I was just sending the GetMonth() result and did not consider it was returning 0-11 for month, and it is needed for convert function to get month number as 1-12. By just adding one to the month it is alright now. thanks everybody.