Leser: 4
6 Einträge, 1 Seite |
1
2
3
4
my ($day,$month,$year,) = split(/-/,$history_tradedate);
# Creates the timestamp(often have to write -1 because many date functions
# start with 0 for fist month, day etc.)
my $history_in_unixtime = timelocal("00","00","00",$day,$month-1,$year);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
while ($unix_today_minus_x > $history_in_unixtime)
{
hier kommt später code hin
$history_tradedate = strftime ("%d-%m-%Y",localtime($history_in_unixtime));
print "history datum: ".$history_tradedate."\n";
($day,$month,$year,) = split(/-/,$history_tradedate);
print "day: ".$day."\n";
# Creates the timestamp(often have to write -1 because many date functions
# start with 0 for fist month, day etc.)
$history_in_unixtime = timelocal("00","00","00",$day+1,$month-1,$year);
$history_tradedate = strftime ("%d-%m-%Y",localtime($history_in_unixtime));
print "history datum: ".$history_tradedate."\n";
} #
1
2
3
4
5
6
7
8
use Date::Calc qw(Add_Delta_Days);
use Time::Local;
my $date = '31.01.2005';
my ($day,$month,$year) = split(/\./,$date);
($day,$month,$year) = Add_Delta_Days($day,$month,$year,1);
my $timestamp = timelocal(0,0,0,$day,$month-1,$year-1900);
6 Einträge, 1 Seite |