Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / August 2004

Tip: Looking for answers? Try searching our database.

Date Arithmetic

Thread view: 
Kurt Harless - 30 Aug 2004 16:25 GMT
Arg,

So I know I use the Calendar abstract class.  And I am betting that I use
the Add method.
Could I see a example of some date arithmetic, e.g. number of days from
today since 01/01/1964.

Must I work out the differences by year, month, day individually, convert to
a common unit of time, add them, then convert to a displayable unit of time?

Struggling...
Paul Lutus - 31 Aug 2004 07:01 GMT
> Arg,
>
[quoted text clipped - 6 lines]
> to a common unit of time, add them, then convert to a displayable unit of
> time?

Practice with the GregorianCalendar class and its many online tutirials.

Signature

Paul Lutus
http://www.arachnoid.com

Jacob - 31 Aug 2004 12:45 GMT
> So I know I use the Calendar abstract class.  And I am betting that I use
> the Add method.
[quoted text clipped - 3 lines]
> Must I work out the differences by year, month, day individually, convert to
> a common unit of time, add them, then convert to a displayable unit of time?

Look at

  http://geosoft.no/software/day/Day.java.html

It is a simple API for doing date arithmetics
and finding number of days between dates among
others.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.