function toDate7Descr(number year, number month, number day, number hour, number minute, number second, string timeZone) {
string format = "dd-MMM-yyyy HH:mm:ss Z";
desc += "Converted year " + year + ", month " + month + ", day " + day + ", hour " + hour + ", minute " + minute + ", second " + second + ", timeZone " + timeZone;
desc += " to date " + formatDate(toDate(year, month, day, hour, minute, second, 0, timeZone), format) + "\n";
}
function toDate6Descr(number year, number month, number day, number hour, number minute, number second){
desc += "Converted year " + year + ", month " + month + ", day " + day + ", hour " + hour + ", minute " + minute + ", second " + second;
desc += " to date " + toDate(year, month, day, hour, minute, second) + "\n";
}
function toDate3Descr(number year, number month, number day){
desc += "Converted year " + year + ", month " + month + ", day " + day;
desc += " to date " + toDate(year, month, day) + "\n";
}
desc = "";
toDate3Descr(2013, 12, 31);
toDate3Descr(2013, 2, 28);
toDate3Descr(2012, 2, 29);
toDate3Descr(2013, 2, 29);
toDate6Descr(2013, 12, 31, 23, 59, 59);
toDate6Descr(2013, 2, 28, 0, 0, 0);
toDate6Descr(2012, 2, 29, 14, 15, 16);
toDate6Descr(2013, 1, 1, 24, 1, 1);
toDate7Descr(2012, 01, 20, 0, 0, 0, "GMT+2"); |