(view source code of sortdate.js as plain text)
// SortDate.js, Version 1.00 for Windows Script Host 1.00
// Show current date in YYYYMMDD format
// Written by Rob van der Woude
// http://www.robvanderwoude.com
// Get and parse current date
now = new Date();
day = now.getDate();
month = now.getMonth() + 1;
year = now.getYear();
// Add leading spaces if necessary
if ( day < 10 ) day = "0" + day;
if ( month < 10 ) month = "0" + month;
// Concatenate strings and display the result
WScript.Echo( "SortDate=" + year + "" + month + "" + day );
page last modified: 2024-04-16; loaded in 0.0046 seconds