Article View: borland.public.jbuilder.java.language
Article #18576Re: Calculations with date...
From: James Cook
Date: Sat, 23 May 1998 00:00
Date: Sat, 23 May 1998 00:00
25 lines
1167 bytes
1167 bytes
FοΏ½bio Costa wrote in message <6k41cu$kk4@forums.borland.com>... >I need to make calculations with a date. >Example: "01-jan-1998" + 3 Results: "04-jan-1998" From the JDK 1.1.6 docs.... (It is the Calendar class, what Date was deprecated to.) public abstract void add(int field, int amount) Date Arithmetic function. Adds the specified (signed) amount of time to the given time field, based on the calendar's rules. For example, to subtract 5 days from the current time of the calendar, you can achieve it by calling: add(Calendar.DATE, -5). Parameters: field - the time field. amount - the amount of date or time to be added to the field. jim
Technical Details
Message-ID:
<6k851v$r2r$1@suriname.it.earthlink.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6k41cu$kk4@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f74b3,cfa4ad9c94d26748 X-Google-Attributes: gidf74b3,public From: "James Cook" <oravecz@earthlink.net> Subject: Re: Calculations with date... Date: 1998/05/23 Message-ID: <6k851v$r2r$1@suriname.it.earthlink.net> X-Deja-AN: 355984777 References: <6k41cu$kk4@forums.borland.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: EarthLink Network, Inc. Newsgroups: borland.public.jbuilder.java.language