Jump to content

What wrong with this script?


mcmuney

Recommended Posts

The year shows, "110" instead of "2010", what's wrong?

 

<script language="JavaScript"><!--



       var DayOfWeek = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

       var MonthName = new Array('January','February','March','April','May','June','July','August','September',

                          'October','November','December');

       var theDate = new Date();



       document.write('<NOBR>' +

               DayOfWeek[theDate.getDay()] + ' ' +

		   MonthName[theDate.getMonth()] + ' ' +

               theDate.getDate() + ', ' +

               (theDate.getYear() < 100 ? theDate.getYear() + 2000 : theDate.getYear()) +

              '</NOBR>');

        //--></script>

Link to comment
https://forums.phpfreaks.com/topic/199442-what-wrong-with-this-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.