|< 1 2 >| | 17 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
my $heute = get_date();
print $heute,"\n";
sub get_date{
my $year = ((localtime(time))[5] + 1900);
my $month = ((localtime(time))[4] + 1);
my $day = (localtime(time))[3];
my $date = sprintf("%02d.%02d.%04d",$day,$month,$year);
return $date;
}# end of subroutine
1
2
3
4
5
6
7
8
9
10
my $heute = get_date();
print $heute,"\n";
sub get_date{
my $year = ((localtime(time))[5] + 1900);
my $month = ((localtime(time))[4] + 1);
my $day = (localtime(time))[3];
my $date = sprintf("%02d.%02d.%04d",$day,$month,$year);
return $date;
}# end of subroutine
1
2
3
4
5
sub get_date{
my $tm = shift || time;
my @lt = localtime($tm);
return (sprintf "%02d.%02d.%04d", $lt[3], $lt[4] + 1, $lt[5] + 1900);
}# end of subroutine
|< 1 2 >| | 17 Einträge, 2 Seiten |