HTML - PowerCram Blog

Display Today’s (Current) Date Dynamically in HTML Pages

The Easy Way <script language=”javascript”> <!– document.write(Date()); –> </script> The easy way provides date, time and timezone information. If you want to display the date only, the following way will do that. The Hard Way <script language=”javascript”> <!– Today = new Date(); TodayDay = Today.getDate(); TodayMon = Today.getMonth(); TodayYear = Today.getYear(); if (TodayYear < 2000) TodayYear += 1900; […]