Leser: 2
4 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl
use strict;
use Date::Manip;
my $date1 = "2007-10-15 10:10:23";
my $date2 = "2007-10-16 10:10:25";
my $err;
my $date = DateCalc($date1, $date2, \$err);
print "$date\n";
1
2
3
4
5
6
7
8
9
10
use strict;
use DateTime;
use DateTime::Format::ISO8601;
use Data::Dumper;
my $date1 = DateTime::Format::ISO8601->parse_datetime("2007-10-15T10:10:23");
my $date2 = DateTime::Format::ISO8601->parse_datetime("2007-10-16T10:10:25");
my $delta = $date2-$date1;
print Dumper($delta->deltas), "\n";
4 Einträge, 1 Seite |