Skip to content

Commit 26bd494

Browse files
author
Jan-Olof Hendig
committed
Added documentation for the weekday-of-month method
1 parent 5c13737 commit 26bd494

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/Type/Dateish.pod

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,19 @@ at the start or end of a year, the week may actually belong to the other year.
148148
say $week; # 1
149149
say Date.new('2015-01-31').week; # 2015 5
150150
151+
=head2 method weekday-of-month
152+
153+
Defined as:
154+
155+
method weekday-of-month(Date:D:) returns Int:D
156+
157+
Usage:
158+
159+
Dateish.weekday-of-month
160+
161+
Returns a number 1..5 indicating the number of times a particular day-of-week
162+
has occurred so far during that month, the day itself included.
163+
164+
say Date.new("2003-06-09").weekday-of-month; # 2 (second Monday of the month)
165+
151166
=end pod

0 commit comments

Comments
 (0)