Thread Datumstermine ermitteln (18 answers)
Opened by la_dy82 at 2011-01-19 15:13

GwenDragon
 2011-01-19 15:16
#144847 #144847
User since
2005-01-17
14785 Artikel
Admin1
[Homepage]
user image
//EDIT2:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
use Date::Calc qw/Today Delta_Days Add_Delta_Days/;

my $date_from = "2009.08.22";

my ($Y,$M,$D) = split(/\./,$date_from); # Startdatum JMT
my ($Yn,$Mn,$Dn) = Today();                             # Datum JMT Jetzt

my $delta_days =  Delta_Days($Y,$M,$D,$Yn,$Mn,$Dn);

for my $d (0..$delta_days) {
      my ($year,$month,$day) = Add_Delta_Days(($Yn,$Mn,$Dn), $d);
          print join ".",($year,$month,$day), "\n";
}


//EDIT: Oh habe ich falsch verstanden, es sollte also eine Reihe von Dateinamen erzeugt werden, bei denen Monate und Tage hochgezählt werden.

Last edited: 2011-01-19 18:21:32 +0100 (CET)

View full thread Datumstermine ermitteln