🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

HELP: Calendar, DateFormat class

#18017
From: zav
Date: Thu, 20 Aug 1998 00:00
35 lines
1586 bytes
Hi All,

I have instantiated a GregorianCalendar for a specific Locale and also
got a DateTimeInstance for DateFormat class.  Unfortunately it seems
impossible to get hold of the DAY of the week as a Locale sensitive
string such as Monday, Lundi, Montag etc...

The GregorianCalendar is created as new GregorianCalendar(Locale.UK or
US or FRENCH);
The DateFormat is created based on the FULL format to get as much detail
as possible...

The DateFormat class returns a Locale sensitive string of the current
date using the format() method which has two signatures.

One is format(Date dateobj);

The other is format(Date dateobj, StringBuffer stringobj, FieldPosition
fieldposition)

The latter method always outputs the full date String rather than just
the fieldPosition you're interested such as Monday, Lundi etc...

Can anyone explain how you can get this sort of information out of these
classes???  Any help would be much appreciated.
Thanks in advance.

regards,

Zav


Datacraft Design Limited
United Kingdom, London
Tel: 0171 803 0828
Technical Details
Message-ID: <35DBFD58.6BCC6EF3@gic-net.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,90391de4ef3c5f18,start
X-Google-Attributes: gidf74b3,public
From: zav <zav@gic-net.com>
Subject: HELP: Calendar, DateFormat class
Date: 1998/08/20
Message-ID: <35DBFD58.6BCC6EF3@gic-net.com>
X-Deja-AN: 382952102
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language