File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,13 @@ Optionally accepts a formatter as a named parameter.
70
70
71
71
say Date.new-from-daycount(49987); # OUTPUT: «1995-09-27»
72
72
73
+ = head2 method daycount
74
+
75
+ method daycount(Date:D: --> Int:D)
76
+
77
+ Returns the number of days from epoch Nov. 17, 1858, i.e. the
78
+ L < Modified Julian Day|https://en.wikipedia.org/wiki/Julian_day > .
79
+
73
80
= head2 method last-date-in-month
74
81
75
82
method last-date-in-month(Date:D: --> Date:D)
@@ -182,6 +189,25 @@ Converts the invocant to L«C<DateTime>|/type/DateTime»
182
189
say Date.new('2015-12-24').DateTime; # OUTPUT: «2015-12-24T00:00:00Z»
183
190
say Date.DateTime; # OUTPUT: «(DateTime)»
184
191
192
+ = head2 method Int
193
+
194
+ multi method Int(Date:D --> Int:D)
195
+
196
+ Converts the invocant to L « C < Int > |/type/Int» . The same value can be
197
+ obtained with the C < daycount > method.
198
+
199
+ Available as of release 2023.02 of the Rakudo compiler.
200
+
201
+ = head2 method Numeric
202
+
203
+ multi method Numeric(Date:D --> Int:D)
204
+
205
+ Converts the invocant to L « C < Int > |/type/Int» . The same value can be
206
+ obtained with the C < daycount > method. This allows C < Date > objects to
207
+ be used directly in arithmetic operations.
208
+
209
+ Available as of release 2023.02 of the Rakudo compiler.
210
+
185
211
= head1 Functions
186
212
187
213
= head2 sub sleep
You can’t perform that action at this time.
0 commit comments