|< 1 2 3 >| | 24 Einträge, 3 Seiten |
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/local/bin/perl -w
use Time::Local;
open(DAT,"datum.txt");
while(<DAT>)
{
$last_Date_Search = $_;
}
close DAT;
print $last_Date_Search;
#assign date from file to $last_date
my $last_date = $last_Date_Search;
#split date in 2005 and 11 and 01 after / => month 12 = 11, counts from 0..11
my @array_date = split /\//,$last_date;
if ($array_date[1] == 12) {
$array_date[1] = $array_date[1] - 1;
}
#day month &nbs
p; year
my $dpe = timelocal(0,0,0,$array_date[2],$array_date[1],$array_date[0]);
print $dpe, "\n";
#add 14 days to $dpe => 14 days in seconds: 1209600
my $new_date_Search_seconds = $dpe + 1209600;
print $new_date_Search_seconds, "\n";
(my $sec,my $min,my $hours,my $mday,my $month,my $year,my $wday,my $yday, my $st)=localtime($new_date_Search_seconds);
print $mday, "\n";
print $month, "\n";
print $year, "\n";
if ($month == 00) {
$month = 12;
}
my $new_year = $year + 1900;
if (($mday <= 9) || ($month <= 9)) {
print $new_year,"/0",$month,"/0",$mday, "\n";
open(DAT,">datum.txt");
print DAT $new_year ,"/0", $month, "/0", $mday, "\n";
close DAT;
} else {
print $new_year ,"/", $month, "/", $mday, "\n";
open(DAT,">datum.txt");
print DAT $new_year ,"/", $month, "/", $mday, "\n";
close DAT;
}
$$_ = $$_ < 10 ? $$_ = "0".$$_ : $$_ for (\$mday, \$month, \$year);
$_ = $_ < 10 ? $_ = "0".$_ : $_ for ($mday, $month, $year);
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl
use strict;
use warnings;
use Date::Calc qw(Add_Delta_Days);
my $inkr = 14; # Datum 14 Tage hochzaehlen
my $date = '2004/11/23';
my @info = split /\//,$date;
my @new_info = Add_Delta_Days(@info,$inkr);
print join("/",map{sprintf "%02d",$_}@new_info);
|< 1 2 3 >| | 24 Einträge, 3 Seiten |