altf4
03-23-2008, 02:39 PM
hello NG .. i have a Date in a Var
returned by a subfunction.
like this:return MochiKit.DateTime.toISODate(time).substr(2);
the output is simply YY-MM-DD
i would like to rewrite the date to be like DD.MM.YY
but my code :
var day2 = MochiKit.DateTime.toISODate(time).substr(8);
var month2 = MochiKit.DateTime.toISODate(time).substr(5).substring(3);
var year2 = MochiKit.DateTime.toISODate(time).substr(2).substring(6);
return day2 + '.' + month2 + '.' + year2;
(sure somethings very stupid) does not work at all ;-)
the output is always DD.DD.DD
any ideas ??
returned by a subfunction.
like this:return MochiKit.DateTime.toISODate(time).substr(2);
the output is simply YY-MM-DD
i would like to rewrite the date to be like DD.MM.YY
but my code :
var day2 = MochiKit.DateTime.toISODate(time).substr(8);
var month2 = MochiKit.DateTime.toISODate(time).substr(5).substring(3);
var year2 = MochiKit.DateTime.toISODate(time).substr(2).substring(6);
return day2 + '.' + month2 + '.' + year2;
(sure somethings very stupid) does not work at all ;-)
the output is always DD.DD.DD
any ideas ??