🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

How to parse "strange" date formats?

#18951
From: Bryce McKinlay
Date: Tue, 31 Mar 1998 00:00
19 lines
1135 bytes
I need to be able to parse dates in the form '980331', where the first
two chars are the year, second two the month, and so on. I figured I
could  probibly do this using by converting the chars to integers and
using the:

public Date(int year, int month, int date);

constructor of the date class (after tweaking the values to be in line
with  what the Date class expects), but this method is deprecated in
JDK 1.1.x!!

Is there any way to get the equivilant of this functionality in JDK
1.1? Or does anyone have any code samples that do something similar to
this?

regards

  [ bryce ]
Technical Details
Message-ID: <35208337.1655452354@forums.borland.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,65f118277b3cc2db,start
X-Google-Attributes: gidf74b3,public
From: bryce.mckinlay@stonebow.otago.ac.nz (Bryce McKinlay)
Subject: How to parse "strange" date formats?
Date: 1998/03/31
Message-ID: <35208337.1655452354@forums.borland.com>
X-Deja-AN: 339375336
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.language