Closed mdbaniani closed 3 years ago
apparently, setting noon time (12:00) for date object before manipulating, solved the problem:
start.set("hour", 12).set("minute", 0);
This must be the daylight saving time interfering. It's better to set a time in this case. Also, months are zero-based in moment.
will result in : 1370/12/30
I expected : 1371/1/1.
Is this expected behavior? please correct me if I am wrong
also:
moment('1370/12/30', 'jYYYY/jM/jD').jMonth()
should result in 12 but returns 11.