method DateTime
1 | class Date |
1.1 | (Date) method DateTime |
2 | class Instant |
2.1 | (Instant) method DateTime |
3 | class DateTime |
3.1 | (DateTime) method DateTime |
Documentation for method DateTime
assembled from the following types:
class Date
From Date
(Date) method DateTime
Defined as:
multi method DateTime(Date --> DateTime)multi method DateTime(Date --> DateTime)
Converts the invocant to DateTime
say Date.new('2015-12-24').DateTime; # OUTPUT: «2015-12-24T00:00:00Z»say Date.DateTime; # OUTPUT: «(DateTime)»
class Instant
From Instant
(Instant) method DateTime
Defined as:
method DateTime(Instant: --> DateTime)
Coerces the invocant to DateTime.
say now.DateTime; # OUTPUT: «2017-05-09T14:02:58.147165Z»
class DateTime
From DateTime
(DateTime) method DateTime
Defined as:
method DateTime(--> DateTime)
Returns the invocant.
say DateTime.new("2012-02-29T12:34:56.946314Z").DateTime;# OUTPUT: «2012-02-29T12:34:56.946314Z»say DateTime.DateTime;# OUTPUT: «(DateTime)»