commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Schofield <>
Subject Re: [lang] Has anyone thought about a TimeUtils package?
Date Tue, 17 Dec 2002 15:41:40 GMT
>I think we should stick with the existing syntax for using SimpleDateFormat
>since that is what people already know, I can't think of a powerful reason
>to not stick with it.  

>I like the preset patterns in DateUtils like ISO8601_TIME_PATTERN, however,
>I also wish that there was a way to register new patterns globally.  
I agree that the ISO patterns are nice.  We probaly want another few 
hard-coded formats and the ability to add more as you say.  Perhaps we 
could have a static method for adding a custom format that would be 
available from then on out through another static method for formating 
using the custom format.

>I work
>with MSSQL Server, and have to convert  their pattern a lot: 2002-12-12
>23:25:29.93.  However, I guess we wouldn't want to dump in a million
>patterns into the core code base.  
Yeah we should probably resist the temptation to make this too 
specialized.  Using the custom methods you could achieve the same thing 
by making the SQL server a constant in your code and then use the custom 
methods.  Deciding which formats make it into DateUtils will be a bit 
sticky (I predict.)

- sean

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message