hi GT'ers
the goal of the following global sub is to return either 01 (if the day is 01-14) or 15 (if the day is 15 or greater), and it works just fine:
sub {
my $date = GT::Date::date_get();
my $day = substr($date, 8,2);
my $part = ($day < 15 ? '01' : '15');
return {check_date => $part};
}
now, however, i want it to return either 01 (if day is 01-07), 08 (if day is 08-14), 15 (if day is 15-21), or 22 (if day is greater than 21)... any ideas on how i need to change my $part ???? i'm failing at it... thanks for helping a novice learn
-kysa
the goal of the following global sub is to return either 01 (if the day is 01-14) or 15 (if the day is 15 or greater), and it works just fine:
sub {
my $date = GT::Date::date_get();
my $day = substr($date, 8,2);
my $part = ($day < 15 ? '01' : '15');
return {check_date => $part};
}
now, however, i want it to return either 01 (if day is 01-07), 08 (if day is 08-14), 15 (if day is 15-21), or 22 (if day is greater than 21)... any ideas on how i need to change my $part ???? i'm failing at it... thanks for helping a novice learn
-kysa