| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
You think so? Try it for today being Feb 24, 2005. The answer will be 25, which is incorrect. The reason is that there are more than 52 weeks to a year. Even using (days * 365) will sometimes be incorrect, since some years have 366 days.
There is a simple way to do that :
set b_date to date "29/02/1980"
set a_date to (current date)
return (a_date - b_date) div (weeks * 52)
If you want a more accurate number, just change 'div' in '/'.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-studio mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-studio/email@hidden This email sent to email@hidden
| References: | |
| >Re: date and age (From: Brian <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.