Saturday 2 June 2012

Date difference javascript

I want to compare the date selected from datepicker and the current date. Though everything seemed right, i didn't get the correct output. The reason is the date from datepicker contains time as 00:00:00 where as the currentdate contains the proper time. Set the time as zero using setHours().
date1 = new Date();
date1.setHours(0,0,0,0);
Reference: 
http://stackoverflow.com/questions/2698725/
comparing-date-part-only-without-comparing-time-in-javascript 

NuSOAP charset encoding issues

Once when I used NuSOAP, I faced problem in the display of chinese characters. They are displayed as question marks. Finally , I was able to crack it by setting the below varaible to false.
$soapClient->decode_utf8 = false;
Reference: 
http://stackoverflow.com/questions/5317858/nusoap-and-content-type
http://forum.nusphere.com/nusoap-with-utf-8-t4974.html 

GMT time in PHP