🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8036

Re: time and date classes

#8036
From: John McGrath TeamB
Date: Sat, 28 Apr 2001 11:38
31 lines
2094 bytes
On Fri, 27 Apr 2001 14:35:39 -0400, Dave Cullen wrote:

> The Date class is depricated and replaced with GregorianCalendar.
> But GregorianCalendar.getTime() returns a Date object.

The Date class is not deprecated, but some of its methods are.

The original design of the Date class mixed together two different 
concepts.  One is a point in time, which is for all practical uses, a 
universal value.  The other is the notion of calendars, which has to do 
with how people record instances in time, and which varies from culture 
to culture (Gregorian, Julian, Hebrew, Islamic, etc.)  To fix this, 
they deprecated the calendar concepts from the Date class and created 
the various calendar classes to handle them.

> What are the best methods for retrieving the date and parsing
> the result?

Date is used to represent an absolute point in time.  Calendar is used 
to represent a point in time as represented by a calendar system such 
as the Gregorian calendar.  The DateFormat class can be used for 
parsing or formatting date/time strings.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.15546bcb778dda1998a153@forums.borland.com>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!news-out.visi.com!hermes.visi.com!news.tele.dk!193.251.151.101!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3ae9bac9$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,bbd9694ac963e101
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-04-28 04:46:04 PST
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: time and date classes
Date: Sat, 28 Apr 2001 07:38:13 -0400
Message-ID: <MPG.15546bcb778dda1998a153@forums.borland.com>
References: <3ae9bac9$1_1@dnews>
X-Newsreader: MicroPlanet Gravity v2.30
NNTP-Posting-Host: 209.92.40.60
X-Trace: dnews 988457892 209.92.40.60 (28 Apr 2001 04:38:12 -0700)
Lines: 31
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!news-out.visi.com!hermes.visi.com!news.tele.dk!193.251.151.101!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews