We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 515499d commit f5c5ce3Copy full SHA for f5c5ce3
doc/Type/DateTime.pod
@@ -32,6 +32,9 @@ say $dt; # 2015-11-21T16:01:00Z
32
say $dt.later(days => 20); # 2015-12-11T16:01:00Z
33
say $dt.truncated-to('hour'); # 2015-11-21T16:00:00Z
34
say $dt.in-timezone(-8 * 3600); # 2015-11-21T08:01:00-0800
35
+
36
+my $now = DateTime.now(formatter => { .hour ~ ":" ~ .minute });
37
+say $now; # 12:45 (or something like that)
38
=end code
39
40
=head1 Methods
@@ -92,11 +95,12 @@ Defined as:
92
95
93
96
Usage:
94
97
- DateTime.now
98
+ DateTime.now(TIMEZONE?, FORMATTER?)
99
100
Creates a new C<DateTime> object from the current system time, optionally with
101
a different timezone than the default attached.
102
103
104
=head2 method clone
105
106
Defined as:
0 commit comments