mIRC Home    About    Download    Register    News    Help

Print Thread
#230374 05/03/11 11:12 PM
Joined: Aug 2010
Posts: 9
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Aug 2010
Posts: 9
Code:
/old {
  SAY  $calc(($ctime($asctime(yyyy-mm-dd HH:nn:ss)) - $ctime(1983-03-06 00:00:00)) /31557600.0)  ans. 365.25 jours
}


[00:00:00] <symaski62> 28 ans. 365.25 day

smile

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You can replace
Code:
$ctime($asctime(yyyy-mm-dd HH:nn:ss))
with just
Code:
$ctime


If you are looking for a more accurate display of the age calculated, a more complex method is required, since months and years have varying lengths. Months range from 28 - 31 days, and years from 365 - 366 days.

If not, please explain the reason for your post.


Link Copied to Clipboard