If you subtract one date from another it will give you the difference in
days.
-----Original Message-----
From: Bill Robinson [mailto:bill.robinson@s...]
Sent: 17 April 2002 19:22
To: JavaScript HowTo
Subject: [javascript_howto] Date Difference Calculation
I need to find the difference in years if more than 1 or days if less than
1 year between two dates. The user enters an effective date and an
expiration date. I then need to calculate the term, which is the
expiration date minus the effective date.
Any help would be greatly appreciated.
Bill Robinson
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com
Headquarters Address & Contact Numbers
150 Broomielaw
5 Atlantic Quay
Glasgow
G2 8LU.
Tel: +44 (0) 141 248 2700.
Fax: +44 (0)141 221 3217
This message is sent in confidence for the addressee only.
It may contain legally privileged information. The contents are not to
be disclosed to anyone other than the addressee. Unauthorised recipients
are requested to preserve this confidentiality and to advise the sender
immediately of any error in transmission.