Weekly Countdown - Is it possible to have a variable end date?
# Get the time
my $time = localtime (time);
# $time is a string of date, time, etc. split on a white space
# Split time into its different elements
($day, $mon, $dayNumber, $timeVal, $year) = split " ", $time, 5;
This should help you,
Malte
----------
Malte Ubl - [red]Germany[/red] - http://goKewl.com/
[red]The beats of 1000 hearts inside...[/red] the merciless pulsation... [red]and all I know is I'll be back...[/red] back to trance nation!
Blur posted this at 02:47 — 22nd August 1999.
They have: 66 posts
Joined: May 1999
I have a site dedicated to a certain TV show, which airs weekly at 10pm every friday on CBS. I want to write up a script that will display a countdown until the next episode, and I'm not sure how to tackle it. Does something like this exist yet?
Here's what I'm thinking... First I'd need some type of formula to calculate when it's friday in the numerical sense. After I found the first friday in a year, and if I knew the number of days in each month, then it should be simple to know that for example the 7th, 14th, and 21st are fridays... but I'm not sure. That's one of the things I'm having trouble with, aswell as how to import the date into perl (newbie question) is it just an environmental var? If so, what's it's name? I'm kinda new to PERL, I mainly do C(++) and Pascal, but this seems similar... any help would be greatly apprecaited!
Thanks!
----------
-Blur
Proudly Canadian
Ed Aronyk (Blur)
Divergent Digital Media
The secret of success is sincerity. Once you can fake that, you've got it made.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.