2 summary:: an object describing a point in time
10 Create a new date with the given properties (all numerical values). These arguments are also the names of instance variables of the date object.
13 Get current date from system and create a date object from it.
24 Get current localized time from system and create a date object from it.
27 Get current strong::Greenwich Mean Time (GMT):: from system and create a date object from it.
30 Get current date and return a value suitable for seeding a random number generator. See also link::Reference/randomSeed##randomSeed::.
34 thisThread.randSeed = a;
35 20.do { [1,0].choose.post }; "".postln;
36 thisThread.randSeed = a;
37 25.do { [1,0].choose.post }; "".postln;
44 Set the receiver's time to current localtime.
47 Set the receiver's time to current strong::Greenwich Mean Time (GMT)::.
50 Obtain a string with the year, month and day in the format strong::YYMMDD::.
53 Obtain a string in the format strong::H:M:S::.
56 Obtain a string with the seconds.
59 Obtain a string in the format strong::YYMMDD_HHMMSS::.
61 method::asSortableString
62 Obtain a string in an alphabetically sortable standard database format.
65 Obtain a string in the format WeekdayName MonthName Time Year.
71 Obtain a date string with a given format. The character % is replaced by the appropriate value, which is derived from the letter that follows.
73 Date.getDate.format("Today is %A. It is around %I o'clock (%p), in %B.");
74 Date.getDate.format("%Y-%d-%e-%Hh%m");
79 A list of formats can be found here: http://www.opengroup.org/onlinepubs/009695399/functions/strftime.html
85 || Replaced by the locale's abbreviated weekday name. [ tm_wday]
88 || Replaced by the locale's full weekday name. [ tm_wday]
91 || Replaced by the locale's abbreviated month name. [ tm_mon]
94 || Replaced by the locale's full month name. [ tm_mon]
97 || Replaced by the locale's appropriate date and time representation.
100 || Replaced by the year divided by 100 and truncated to an integer, as a decimal number [00,99]. [ tm_year]
103 || Replaced by the day of the month as a decimal number [01,31]. [ tm_mday]
106 || Equivalent to %m / %d / %y. [ tm_mon, tm_mday, tm_year]
109 || Replaced by the day of the month as a decimal number [1,31]; a single digit is preceded by a space. [ tm_mday]
112 || Equivalent to %Y - %m - %d (the ISO 8601:2000 standard date format). [ tm_year, tm_mon, tm_mday]
115 || Replaced by the last 2 digits of the week-based year (see below) as a decimal number [00,99]. [ tm_year, tm_wday, tm_yday]
118 || Replaced by the week-based year (see below) as a decimal number (for example, 1977). [ tm_year, tm_wday, tm_yday]
121 || Equivalent to %b. [ tm_mon]
124 || Replaced by the hour (24-hour clock) as a decimal number [00,23]. [ tm_hour]
127 || Replaced by the hour (12-hour clock) as a decimal number [01,12]. [ tm_hour]
130 || Replaced by the day of the year as a decimal number [001,366]. [ tm_yday]
133 || Replaced by the month as a decimal number [01,12]. [ tm_mon]
136 || Replaced by the minute as a decimal number [00,59]. [ tm_min]
139 || Replaced by a <newline>.
142 || Replaced by the locale's equivalent of either a.m. or p.m. [ tm_hour]
145 || Replaced by the time in a.m. and p.m. notation; in the POSIX locale this shall be equivalent to %I :%M :%S%p. [ tm_hour, tm_min, tm_sec]
148 || Replaced by the time in 24-hour notation (%H : %M ). [ tm_hour, tm_min]
151 || Replaced by the second as a decimal number [00,60]. [ tm_sec]
154 || Replaced by a <tab>.
157 || Replaced by the time ( %H : %M : %S ). [ tm_hour, tm_min, tm_sec]
160 || Replaced by the weekday as a decimal number [1,7], with 1 representing Monday. [ tm_wday]
163 || Replaced by the week number of the year as a decimal number [00,53]. The first Sunday of January is the first day of week 1; days in the new year before this are in week 0. [ tm_year, tm_wday, tm_yday]
166 || Replaced by the week number of the year (Monday as the first day of the week) as a decimal number [01,53]. If the week containing 1 January has four or more days in the new year, then it is considered week 1. Otherwise, it is the last week of the previous year, and the next week is week 1. Both January 4th and the first Thursday of January are always in week 1. [ tm_year, tm_wday, tm_yday]
169 || Replaced by the weekday as a decimal number [0,6], with 0 representing Sunday. [ tm_wday]
172 || Replaced by the week number of the year as a decimal number [00,53]. The first Monday of January is the first day of week 1; days in the new year before this are in week 0. [ tm_year, tm_wday, tm_yday]
175 || Replaced by the locale's appropriate date representation.
178 || Replaced by the locale's appropriate time representation.
181 || Replaced by the last two digits of the year as a decimal number [00,99]. [ tm_year]
184 || Replaced by the year as a decimal number (for example, 1997). [ tm_year]
187 || Replaced by the offset from UTC in the ISO 8601:2000 standard format ( +hhmm or -hhmm ), or by no characters if no timezone is determinable. For example, "-0430" means 4 hours 30 minutes behind UTC (west of Greenwich). If tm_isdst is zero, the standard time offset is used. If tm_isdst is greater than zero, the daylight savings time offset is used. If tm_isdst is negative, no characters are returned. [ tm_isdst]
190 || Replaced by the timezone name or abbreviation, or by no bytes if no timezone information exists. [ tm_isdst]
196 If a conversion specification does not correspond to any of the above, the behavior is undefined.