Article View: borland.public.jbuilder.java.language
Article #17192Get current date
From: Michael Nguyen
Date: Wed, 09 Dec 1998 00:00
Date: Wed, 09 Dec 1998 00:00
14 lines
971 bytes
971 bytes
I use the following approach to get the current date only without the
curent minutes and seconds, so that I can compare the dates
without comparing the time. However, the Date constructor is
deprecated.
What is the alternative and non-deprecated method of getting the
current date without the time ?
Date curr_date = new Date (calendar.get (Calendar.YEAR) - 1900,
calendar.get (Calendar.MONTH), calendar.get
(Calendar.DAY_OF_MONTH));
Thanks for the info.
Michael,
Technical Details
Message-ID:
<366F13D2.11F2FBB9@home.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,f08bdc690f36e25a,start X-Google-Attributes: gidf74b3,public From: Michael Nguyen <michaelmn@home.com> Subject: Get current date Date: 1998/12/09 Message-ID: <366F13D2.11F2FBB9@home.com> X-Deja-AN: 420623403 Content-Transfer-Encoding: 7bit Organization: Another Netscape Collabra Server User Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language