date-month wrong

Post bugs here!

date-month wrong

Postby kevinotton » Sun Feb 08, 2015 2:47 pm

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
kevinotton
 
Posts: 39
Joined: Thu May 15, 2014 8:18 am
Location: Needham Market, Suffolk, UK

Re: date-month wrong

Postby support » Mon Feb 09, 2015 1:19 am

In javascript , moth is based on 0.

0 -> January
support
 
Posts: 352
Joined: Sat Apr 27, 2013 9:22 am


Return to Bug Report

Who is online

Users browsing this forum: No registered users and 1 guest

cron