-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path_test.pl
executable file
·26 lines (19 loc) · 884 Bytes
/
_test.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl -w
use strict;
use DateTime;
use DateTimeX::Easy qw/datetime/;
my $dt = DateTime->from_epoch(epoch => time, time_zone => "local");
warn $dt->time_zone->name;
print datetime("first day of last month"), "\n";
print datetime("last day of last month"), "\n";
print datetime("last second of first month of last year"), "\n";
print datetime("last second of first month of year of 2005"), "\n";
print datetime("last second of last month of year of 2005"), "\n";
print datetime("beginning day of month of 2007-10-02"), "\n";
print datetime("end day of month of 2007-10-02"), "\n";
print datetime("last month of year of 2007"), "\n";
print datetime("last month of 2007"), "\n";
print datetime("end day of 2007-10-02"), "\n";
print datetime("beginning day of 2007-10-02"), "\n";
print datetime("last day of 2007"), "\n";
print datetime("last day of year of 2007"), "\n";