Date format: Difference between revisions

m
Added comment explaining Index/Value of timelist() function
(Added LiveCode example)
m (Added comment explaining Index/Value of timelist() function)
Line 3,146:
 
=={{header|Ring}}==
<lang ringC>
dateStr = date()
date1 = timelist()[19] + "-" + timelist()[10] + "-" + timelist()[6]
Line 3,153:
? 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
*/
 
</lang>
{{out}}
57

edits