mIRC Home    About    Download    Register    News    Help

Print Thread
#103587 22/11/04 10:20 PM
Joined: Nov 2004
Posts: 1
M
Mostly harmless
OP Offline
Mostly harmless
M
Joined: Nov 2004
Posts: 1
Hi!
i need a bit help.
i want a script that shows the amount of days from today until a special date.
the problem is: i want that it doesn't only show 182 days are left, it should show: 182,5 days are left.. and 12 hours later 182,0 days are left, and 12 hours later 181,5 days are left.
it should count half days.

anyone can help me? would be great.
thanks!

#103588 23/11/04 01:23 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
//echo -a $calc($int($calc(($ctime(25/12/2004 00:00)-$ctime)/43200))/2) days

#103589 23/11/04 09:44 AM
Joined: Nov 2004
Posts: 842
Hoopy frood
Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
//echo -a $duration($calc($ctime - $ctime($asctime(Dec 25 yyyy))))

or

//echo -a $duration($calc($ctime($asctime(Dec 25 yyyy)) - $ctime))

I forget which one it is... try both


What do you do at the end of the world? Are you busy? Will you save us?

Link Copied to Clipboard