http://jsfiddle.net/skowron_line/zPCBc/1/
var d1 = '31.05.2012';
var d2 = '01.06.2012';
var s1 = d1.split('.');
var s2 = d2.split('.');
var nd1 = new Date(s1[2], s1[1], s1[0]);
var nd2 = new Date(s2[2], s2[1], s2[0]);
$('#a').html(s1 + ' - '+ s2 +' = '+ nd2.getTime() +' - '+ nd1.getTime());
$('#b').html(
nd1.getFullYear() +'-'+ nd1.getMonth() +'-'+ nd1.getDate() +'<br />'+ nd2.getFullYear() +'-'+ nd2.getMonth() +'-'+ nd2.getDate()
);
誰かがこのコードの何が問題なのか説明できますか??。なぜ31.05.2012
私は等しい01.06.2012