mIRC Home    About    Download    Register    News    Help

Print Thread
Count down timer, for say a birthday? #179311 20/06/07 11:25 PM
Joined: Jun 2007
Posts: 37
E
EffingHell Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Jun 2007
Posts: 37
Hi, is there any way to make a count down for the 17th of july .. to display how many days are left till my bday like an alias or something that when i type /bday its says something like 'there are 20 days left till my birthday'

Re: Count down timer, for say a birthday? [Re: EffingHell] #179312 20/06/07 11:29 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
alias bday {
  echo -a $duration($calc($ctime(17/07/2007 00:00) - $ctime))
}

Re: Count down timer, for say a birthday? [Re: EffingHell] #179313 20/06/07 11:37 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
And if you want months/years rather than stopping at weeks, you can use $datediff or $DateXpander. $datediff is easier to use for a countdown into the future. $DateXpander offers accurate months/years even when considering leap years.


Invision Support
#Invision on irc.irchighway.net
Re: Count down timer, for say a birthday? [Re: EffingHell] #179316 21/06/07 03:33 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
While you're asking for a specific date, my CountDown Timer works well, and has quite a few configuration options.