Thread Kalenderwoche + Tag soll Datum generieren (2 answers)
Opened by Gast at 2007-12-07 14:57

renee
 2007-12-07 15:03
#103571 #103571
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
So ungefähr:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl

use strict;
use warnings;
use Date::Calc qw(Monday_of_Week Add_Delta_Days); # muss ggf. installiert werden

my $kw   = 12;
my $syear = 2007;
my $days = 5; # mo => 1, di => 2, mi => 3,...

my ($year,$month,$day) =
      Add_Delta_Days(
          Monday_of_Week($kw,$syear),
               --$days);
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 Kalenderwoche + Tag soll Datum generieren