About Pa-software · Site feedback
welcome  Products  Scripts  Downloads  Forum  Contact us  Support  Resellers 
 
Scripts
 
PHP
JavaScript
Visual Basic
 
External downloads
If you use WSH or just VBScript / JScript, then the most important download to have is the Windows script host documentation (version 5.6).
 
Legal information
End User License Agreement
Non-commercial license
Disclaimer and legal notice
 
 

Date and time JavaScripts

 

Show the current date

For example:

<script language="JavaScript">
<!--
function TodayIs(sText)
{
	var aDays = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday","Saturday");
	var aMonths = new Array("January", "February", "March", "April", "May", "June", "July",
		"August", "September", "October", "November", "December");
	var date = new Date();
	if (sText != "")
		document.write(sText + " ");
	document.write("<i>");
	document.write(aDays[date.getDay()] + ",&nbsp;");
	document.write(aMonths[date.getMonth()] + " ");
	document.write(date.getDate() + ", ");
	if (date.getYear() > 1000)
		document.write(date.getYear());
	else
	{
		if (date.getYear() > 90 && date.getYear() < 100)
			document.write("19" + date.getYear());
		else
		{
			if (date.getYear() > 99)
				document.write(date.getYear() + 1900);
		}
	}
	document.writeln("&nbsp;</i>");
}
// -->
</script>
<script language="javascript">
// Example of use
TodayIs("Today's date is:");
</script>
Rate this page

Products

News

QS Disclaimer 2.6.20 is now available. This version fixes an installer issue with Exchange 2010.

ID3 Editor 1.15.12 in now available. This version includes many improvements and auto versioning

MSAD Login 2.2.3 in now available. This version includes x64 support for 10.6 (Snow Leopard)

Disc Image 2.3.1 is now available for x64 platforms.

back to top
Copyright © 1990-2010 Pa-software. All Rights Reserved.
Developer of Exchange Server e-mail disclaimers, compression, ISO CD/DVD disc image management, MP3 ID3 editing and Macintosh Active Directory integration.