🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Date type to/from string

#19141
From: Tad Frysinger
Date: Tue, 10 Mar 1998 00:00
18 lines
1359 bytes
I need to stringify a Java Date type, and then create a date type from 
that string.  The toString() method in the Date class has not been 
deprecated so this seems to be the most straightforward way to get a 
string, but parse() seems to now be deprecated.  Yet I see nothing else 
in either Date or Calendar/GregorianCalendar to create a date from the 
result of toString() (or from any other string, for that matter).  What 
is the best way to do this?

What I am trying to do is to come up with a good general way to transmit 
Java data types across process boundaries using the three most common 
standards (RMI, CORBA, DCOM).  The way I've chosen for now is resource 
expensive, but at least it will work: I am going to translate all Java 
data types I intend to support to encoded strings, pass the string, then 
assemble them again on the other side.  Thus, I just need a convenient 
way to create a Date data type from a string.

Tad
Technical Details
Message-ID: <MPG.f6f3422293a76d09897c7@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,97ec465ac7d926cb,start
X-Google-Attributes: gidf74b3,public
From: tfrysinger@earthlink.net (Tad Frysinger)
Subject: Date type to/from string
Date: 1998/03/10
Message-ID: <MPG.f6f3422293a76d09897c7@forums.borland.com>
X-Deja-AN: 332692182
Organization: FreeZone Enterprises
Newsgroups: borland.public.jbuilder.java.language