Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
Java in General
Can anyone send me the code to calculate the years/months/days between the tow dates.
Joined: Nov 10, 2005
Jan 27, 2006 00:34:00
I need the code to calculate the number of years/Number of months/and Number of days between the two dates.
if anyone have then please share it.
Joined: Feb 03, 2004
Jan 27, 2006 04:23:00
this is not so trivial, taking leap-years into account...
take a look at
, they have pretty much everything you need.
hope it helps,
It is sorta covered in the
JavaRanch Style Guide
subject: Can anyone send me the code to calculate the years/months/days between the tow dates.
Days between two dates
calculate difference in months
Calculate Number of Days Between Two Days
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014