Thread Zinstage
(13 answers)
Opened by bianca at 2012-08-30 08:17
Falls ich die Beschreibung so einigermassen kapiert hab würd ichs so machen:
Code (perl): (dl
)
1 2 3 4 5 6 my $von = date('2011-05-02'); my $bis = date('2011-07-30'); my $rel_monate = int(($bis - $von)->month); $von += $rel_monate.'M'; my $rel_tage_uebrig = ($bis - $von)->day; print $rel_monate * 30 + $rel_tage_uebrig; 1 + 1 = 10
|