File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,25 @@ week of the next year.
173
173
say Date.new("2014-12-31").week-number; # 1 (first week of 2015)
174
174
say Date.new("2016-01-02").week-number; # 53 (last week of 2015)
175
175
176
+ = head2 method week-year
177
+
178
+ Defined as:
179
+
180
+ method week-year(Date:D:) returns Int:D
181
+
182
+ Usage:
183
+
184
+ Dateish.week-year
185
+
186
+ Returns the week year of the date specified by the invocant. Normally C < week-year >
187
+ is equal to C < Date.year > . Note however that dates early in January often end up in
188
+ the last week of the prior year, and similarly, the final few days of December
189
+ may be placed in the first week of the next year.
190
+
191
+ say Date.new("2015-11-15").week-year; # 2015
192
+ say Date.new("2014-12-31").week-year; # 2015 (date belongs to the first week of 2015)
193
+ say Date.new("2016-01-02").week-year; # 2015 (date belongs to the last week of 2015)
194
+
176
195
= head2 method weekday-of-month
177
196
178
197
Defined as:
You can’t perform that action at this time.
0 commit comments