[Opensource] SimpleDateFormat

Ben Switzer ben at site85.com
Tue Mar 11 18:34:36 PST 2003


Hmm... it does.

I'll give it a go.  Thanks.

Ben

-----Original Message-----
From: opensource-admin at jcorporate.com
[mailto:opensource-admin at jcorporate.com] On Behalf Of Michael Rimov
Sent: Tuesday, March 11, 2003 6:20 PM
To: opensource at jcorporate.com
Subject: Re: [Opensource] SimpleDateFormat


At 02:37 PM 3/11/2003 -0500, you wrote:
>Good day all.
>
>I've been contemplating how best to format dates on an application wide

>basis.  What I've done is as follows:

Ben,

Instead, why don't you create a wrapper object that wraps a DBObject to
get 
what you want.  By implementing a quick 'factory' method, you could end
up 
with code like so:

WrapperObject wrap = WrapperObject.wrap(DBObject obj);
String formattedDate = wrap.getDateField(String fieldName);

Something along these lines would give you two advantages:

1 - Proper division of labor.  The wrapper does what it's supposed to...

which is provide date formatting.

2 - We avoid yet more methods in DBObject, which I'm trying to split up
anyway.

3 - No patching the code while you wait for it to show up in CVS :)

Does this help?
                                                         -Mike


_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/




More information about the Opensource mailing list