6 Einträge, 1 Seite |
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
while($ref = $sth->fetchrow_hashref()) {
....
....
....
my ($tsec,$tmin,$thour,$tmday,$tmon,$tyear,$twday,$tyday,$tisdst) = localtime($ref->{'time'});
&woche;
$tyear = $tyear + 1900;
$tmon = $tmon + 1;
if ($tmday < 10) {$tmday = "0" . $tmday};
if ($tmon < 10) {$tmon = "0" . $tmon};
sub woche
{
$twday =~ s/0/Sonntag/;
$twday =~ s/1/Montag/;
$twday =~ s/2/Dienstag/;
$twday =~ s/3/Mittwoch/;
$twday =~ s/4/Donnerstag/;
$twday =~ s/5/Freitag/;
$twday =~ s/6/Samstag/;
}
$template->param(DATUM => "$tmday.$tmon.$tyear");
$template->param(WOCHENTAG => $twday);
...
..
.
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
my %dayhash = (0 => 'Sonntag',
1 => 'Montag',
2 => 'Dienstag',
3 => 'Mittwoch',
4 => 'Donnerstag',
5 => 'Freitag',
6 => 'Samstag');
while($ref = $sth->fetchrow_hashref()) {
[...]
my ($tsec,$tmin,$thour,$tmday,$tmon,$tyear,$twday,$tyday,$tisdst) = localtime($ref->{'time'});
$twday = $dayhash{$twday};
[...]
}
1
2
3
4
5
6
7
my %dayhash = (0 => 'Sonntag',
1 => 'Montag',
2 => 'Dienstag',
3 => 'Mittwoch',
4 => 'Donnerstag',
5 => 'Freitag',
6 => 'Samstag');
6 Einträge, 1 Seite |