Thread datum inkrementieren (23 answers)
Opened by paidopoieo at 2006-07-28 01:13

renee
 2006-07-28 01:35
#68430 #68430
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Ich würde zu CPAN:Date::Calc raten:

Code: (dl )
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);
\n\n

<!--EDIT|renee|1154036715-->
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread datum inkrementieren