This task has been clarified. Its programming examples are in need of review to ensure that they still fit the requirements of the task.


Task

Display the   current date   in the formats of:

   2007-11-23     and 
   Friday, November 23, 2007


 
dateStr = date()
date1 = timelist()[19] + "-" + timelist()[10] + "-" + timelist()[6]
date2 = timelist()[2] + ", " + timelist()[4] + " " + timelist()[6] + ", " + timelist()[19] + nl
? dateStr
? date1
? date2
 
/*
timelist() ---> List contains the time and date information.
Index           Value
----------------------------
1 - abbreviated weekday name
2 - full weekday name
3 - abbreviated month name
4 - full month name
5 - Date & Time
6 - Day of the month
7 - Hour (24)
8 - Hour (12)
9 - Day of the year
10 - Month of the year
11 - Minutes after hour
12 - AM or PM
13 - Seconds after the hour
14 - Week of the year (sun-sat)
15 - day of the week
16 - date
17 - time
18 - year of the century
19 - year
20 - time zone
21 - percent sign
*/
 
 