The following code is giving me the wrong date. Displays 08/1/2015 not 08/2/2015.
var date = xui.Date,d = new Date();
ns.timelabel.setCaption(date.get(d,'d')+"/" + date.get(d,'m') +"/"+ date.get(d,'y') +" "+ date.get(d,'h')+":" + date.get(d,'n') +":"+ date.get(d,'s') );
Thanks
Kevin
date-month wrong
-
- Posts: 39
- Joined: Thu May 15, 2014 8:18 am
- Location: Needham Market, Suffolk, UK
Re: date-month wrong
In javascript , moth is based on 0.
0 -> January
0 -> January