🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #766

Re: getting a current year

#766
From: Scott Ding
Date: Thu, 09 Jan 2003 12:40
14 lines
1479 bytes
"News" <silva@carlosilva.com> д����Ϣ����
:3dc29cfa@newsgroups.borland.com...
> Please, I need current year. If I use Date.getYear(), JBuilder  write '
> getYear is deprecated. Seek for better solution' .  If run my application,
I
> get a wrong year. Please, can you help me?
>
>
If you only want to get current year
you can try this.
     Calendar calendar = Calendar.getInstance();
     calendar.setTime(new Date());
     int year = calendar.get(Calendar.YEAR) ;
Technical Details
Message-ID: <3e1d6d36$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3dc29cfa@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1089d0,a30efa45031f7f8f
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2003-01-09 04:40:10 PST
Reply-To: "Scott Ding" <scottding@cjsdn.com>
From: "Scott Ding" <scottding@cjsdn.com>
Newsgroups: borland.public.jbuilder.java.api
References: <3dc29cfa@newsgroups.borland.com>
Subject: Re: getting a current year
Date: Thu, 9 Jan 2003 20:40:00 +0800
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 218.1.33.186
Message-ID: <3e1d6d36$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1042115894 218.1.33.186 (9 Jan 2003 04:38:14 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail