Article View: borland.public.jbuilder.java.language
Article #8668Re: date.getDate()
From: Torsten Welches
Date: Tue, 06 Mar 2001 11:45
Date: Tue, 06 Mar 2001 11:45
37 lines
1624 bytes
1624 bytes
Michael, each deprecated method names the "official" replacement in its JavaDoc. Here it's Calendar.get(Calendar.DAY_OF_WEEK) and so on. GregorianCalendar cal = new GregorianCalendar(); cal.setTime(yourDate); int day = Calendar.get(Calendar.DAY_OF_WEEK); .. Torsten "Michael Kutscher" <Michael-Kutscher@pc-coach.de> wrote: >Hi! > >I get warnings, when I cut a date to pieces: > > Date today=new Date(); > int day=today.getDate(); > int month=today.getMonth(); > int year=today.getYear(); > >All three Methods are warned as depreciated. Never the less, the program >works well. > >What are the alternatives to these three get...-methods? > >Are there any problems, when I ignore these warnings? > >Thanks in advance > >Michael > > > >
Technical Details
Message-ID:
<3aa4cde6$1_2@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!207.105.83.65References:
<982ca0$imu$00$1@news.t-online.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,538b71c3c1e362b0 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-03-06 03:54:04 PST From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Sender: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Reply-To: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Subject: Re: date.getDate() Newsgroups: borland.public.jbuilder.java.language X-User-Info: 193.158.55.74 193.158.55.74 References: <982ca0$imu$00$1@news.t-online.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3aa4cde6$1_2@dnews> Date: 6 Mar 2001 03:45:42 -0800 X-Trace: 6 Mar 2001 03:45:42 -0800, 207.105.83.65 Lines: 38 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!207.105.83.65