You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Sean Schofield <ne...@schof.com> on 2002/12/13 16:27:53 UTC

[lang] Has anyone thought about a TimeUtils package?

Greetings.

I'm new to the commons-dev list and I've been throwing out ideas of 
where I might be able to make my first open source contribution.

Has anyone thought about a possible TimeUtils package with commons.lang? 
 There a variety of time-related utilities that I've been working on 
that might be useful.  Any thoughts on this before I get too specific in 
my suggestions?

Sean


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Stephen Colebourne <sc...@btopenworld.com>.
> What is not thread safe about SimpleDateFormatter?  If this is true that
> seems kind of serious!  (I will take a look at the source tonight but it
> might help if you gave me a hint)

http://developer.java.sun.com/developer/bugParade/bugs/4228335.html


> Anyways, this thread safety business sounds like something that might be
> useful to a lot of programmers out there.  I will take a look at what
> you've done in joda and see if I can't figure it out.  Maybe we could
> make a thread-safe version of SimpleDate Formatter be part of the
> proposed TimeUtils/DateUtils/whatever in commons-lang?

If a thread safe formatter would be a [lang] addition independent of Joda, I
can probably get one. It was a submission to Joda, although it then got
changed, enlarged and made Joda specific.

Stephen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Sean Schofield <ne...@schof.com>.
>
>
>Just to get it in quick. -1 to ripping source from the JDK. Licenses bite
>our arses too quickly when you get near here so it's not something ASF can
>do.
>  
>
I thought that might be a problem.  No biggy we can just do our own.

>I'm starting to want a time sub-package as this gets larger :) Once it
>hits 3 classes or so.
>
>Hen
>  
>
I was thinking about this too.  For now I was thinking that the new 
DateFormater could be an inner class but that we'd probably want to open 
it up to everybody eventually.  If that happens, I would agree that 
subpackage becomes more appropriate.

- sean


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Ch...@dlr.de.
Hi,

Henri Yandell wrote:
> 
> On Tue, 17 Dec 2002, Sean Schofield wrote:
> 
> 
>>>I took a quick look at Joda's date parser and saw it has its own
>>>engine.
>>>
>>>I believe the commons one should lean onto the syntax of the java's,
>>>such that should allow it as a bug free plug-in replacement of Sun's.
>>
>>>What do others think?
>>
>>I agree.  I don't think we want to write a  new DateFormat from scratch.
>> Perhaps we can write our own class with synchronized methods that wraps
>>the existing SimpleDateFormat (just a thought.)  Or maybe we can rip the
>>source from the JDK version and add the fixes there.
> 
> 
> Just to get it in quick. -1 to ripping source from the JDK. Licenses bite
> our arses too quickly when you get near here so it's not something ASF can
> do.

My point was that JDK DateFormat code is *so* broken we do not want to rip
it, nor place a synchronized warpper around it. License is another issue...

>>>I need to take a look at Ant's code. Maybe
>>>I'll take the leap and start a working bug free plug-in replacement
>>>of Sun's SimpleDateFormat if no one has taken the lead...
>>
>>We have already moved the ant code int the lang module of CVS (moved it
>>yesterday).  Right now its identical to the Ant code.  We're going to go
>>from there.  A thread-safe DateFormat would probably be a good next
>>step.  We're also trying to figure out what to do with CalendarUtils
>>which came from the sandbox.  (See the recent email thread concerning
>>DateUtils for yesterday's discussion on this.)
> 
> 
> I'm starting to want a time sub-package as this gets larger :) Once it
> hits 3 classes or so.

Either make the DateFormat an inner class to the ant DateUtil or maybe
if the date stuff grows to more than 3 classes, create a subpackage.
I don't have any string feelings on this issue of where (you all in
commons have done a good job in packaging until now!).

> 
> Hen
> 

-- 
:) Christoph Reck


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Henri Yandell <ba...@generationjava.com>.

On Tue, 17 Dec 2002, Sean Schofield wrote:

> > I took a quick look at Joda's date parser and saw it has its own
> > engine.
> >
> > I believe the commons one should lean onto the syntax of the java's,
> > such that should allow it as a bug free plug-in replacement of Sun's.
>
> >
> > What do others think?
>
> I agree.  I don't think we want to write a  new DateFormat from scratch.
>  Perhaps we can write our own class with synchronized methods that wraps
> the existing SimpleDateFormat (just a thought.)  Or maybe we can rip the
> source from the JDK version and add the fixes there.

Just to get it in quick. -1 to ripping source from the JDK. Licenses bite
our arses too quickly when you get near here so it's not something ASF can
do.

> > I need to take a look at Ant's code. Maybe
> > I'll take the leap and start a working bug free plug-in replacement
> > of Sun's SimpleDateFormat if no one has taken the lead...
>
> We have already moved the ant code int the lang module of CVS (moved it
> yesterday).  Right now its identical to the Ant code.  We're going to go
> from there.  A thread-safe DateFormat would probably be a good next
> step.  We're also trying to figure out what to do with CalendarUtils
> which came from the sandbox.  (See the recent email thread concerning
> DateUtils for yesterday's discussion on this.)

I'm starting to want a time sub-package as this gets larger :) Once it
hits 3 classes or so.

Hen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Sean Schofield <ne...@schof.com>.
> I took a quick look at Joda's date parser and saw it has its own
> engine.
>
> I believe the commons one should lean onto the syntax of the java's,
> such that should allow it as a bug free plug-in replacement of Sun's.

>
> What do others think? 

I agree.  I don't think we want to write a  new DateFormat from scratch. 
 Perhaps we can write our own class with synchronized methods that wraps 
the existing SimpleDateFormat (just a thought.)  Or maybe we can rip the 
source from the JDK version and add the fixes there.

> I need to take a look at Ant's code. Maybe
> I'll take the leap and start a working bug free plug-in replacement
> of Sun's SimpleDateFormat if no one has taken the lead...

We have already moved the ant code int the lang module of CVS (moved it 
yesterday).  Right now its identical to the Ant code.  We're going to go 
from there.  A thread-safe DateFormat would probably be a good next 
step.  We're also trying to figure out what to do with CalendarUtils 
which came from the sandbox.  (See the recent email thread concerning 
DateUtils for yesterday's discussion on this.)

- sean


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant using commons code/jars

Posted by Stephane Bailliez <sb...@apache.org>.
----- Original Message -----
From: "Stefan Bodewig" <bo...@apache.org>


> The problem is that we want to be able to bootstrap Ant with as little
> external dependencies as possible.  Thinking about it again, the real
> problem may be that we've never talked about it at all 8-)

I asked myself the question a long time ago but came to the conclusion it
would possibly bring more problems than it will solve.

I wanted to remove the duplication of some methods or utilities classes that
exists in common but many of the interesting classes did simply not
stabilized and were heavily changed in the sandbox. I have seen them migrate
between projects, change the class name, change the method name, change the
number of arguments, and so on.

The only app that I can see could possibly be used as it graduated is
commons-lang.
commons-codec, commons-IO, commons-net, commons-resource are still in
sandbox and that means could possibly change tomorrow.

For future work there could be a lot more like CLI, Discovery, Logging and
others


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant using commons code/jars

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 18 Dec 2002, <di...@multitask.com.au> wrote:

> Has anyone brought it up on ant-dev?

I'm currently on vacation, so I may have missed it, but I think the
answer is no, it hasn't been brought up.

And I doubt Ant would depend on it, we depend on our version of the
zip, bzip2 and tar classes that have been added to commons as well.

The problem is that we want to be able to bootstrap Ant with as little
external dependencies as possible.  Thinking about it again, the real
problem may be that we've never talked about it at all 8-)

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant using commons code/jars

Posted by Henri Yandell <ba...@generationjava.com>.

On Wed, 18 Dec 2002 dion@multitask.com.au wrote:

> Henri Yandell <ba...@generationjava.com> wrote on 18/12/2002 04:08:31 AM:
>
> >
> > Is there any need to ask them? They'll either use it or they won't, but
> in
> > its current position its of no use to other people. Commons is mainly
> > tasked with being a repository of useful code from one project for other
> > projects to use.
> Note the 'use' word there. It's fine having a whole lot of useful code,
> but if none of our projects use it, what's the point?

Well, depends. If none of our projects use it but it still has lots of
interest and users, then maybe we're not very adaptive. If no projects use
it, then yeah there's an issue.

> > Once a piece of code has passed into commons, it is the responsibility
> of
> > the maintainers [who should be the original coders, but often aren't] to
> > focus on strengthening that code for all users and projects, and not
> just
> > the originating project.
> 100% agree. But starting off with one user sounds like a pre-req to me.

I'd love them to use it etc, but trying to harass them now will at best
get them cvs dependent on our tree. Then we get the pain that
Struts/Validator have, ie) Struts must have a Validator release before
Struts can release. I'd hate to have the next release of Ant dependent on
Commons Lang.

If however we just try to build up a good repository, then we have two
subsequent options. 1) Wait for people to arrive. 2) Go advertise.
But in both situations, the consumer is dependent on the release, not cvs.

[The fact that we don't release often enough is a separate issue to solve
I think].

I guess I somehow got sub-conciously brainwashed by Kevin Costner in Field
of Dreams [don't ask, it wasn't ME who chose that from the video store]:
"If you build it, they will come".

Hen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant using commons code/jars

Posted by di...@multitask.com.au.
Henri Yandell <ba...@generationjava.com> wrote on 18/12/2002 04:08:31 AM:

> 
> Is there any need to ask them? They'll either use it or they won't, but 
in
> its current position its of no use to other people. Commons is mainly
> tasked with being a repository of useful code from one project for other
> projects to use.
Note the 'use' word there. It's fine having a whole lot of useful code, 
but if none of our projects use it, what's the point?

> Once a piece of code has passed into commons, it is the responsibility 
of
> the maintainers [who should be the original coders, but often aren't] to
> focus on strengthening that code for all users and projects, and not 
just
> the originating project.
100% agree. But starting off with one user sounds like a pre-req to me.

--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant using commons code/jars

Posted by Henri Yandell <ba...@generationjava.com>.
Is there any need to ask them? They'll either use it or they won't, but in
its current position its of no use to other people. Commons is mainly
tasked with being a repository of useful code from one project for other
projects to use.

Once a piece of code has passed into commons, it is the responsibility of
the maintainers [who should be the original coders, but often aren't] to
focus on strengthening that code for all users and projects, and not just
the originating project.

I may be being a bit bombastic :)

Hen

On Wed, 18 Dec 2002 dion@multitask.com.au wrote:

> Ok, but if they wont use it shouldn't we know sooner rather than later?
> --
> dIon Gillard, Multitask Consulting
> Blog:      http://www.freeroller.net/page/dion/Weblog
> Work:      http://www.multitask.com.au
>
>
> Sean Schofield <ne...@schof.com> wrote on 18/12/2002 03:45:24 AM:
>
> > >
> > >
> > >Has anyone brought it up on ant-dev?
> > >
> > >A quick check on the mail archives searching for DateUtils doesn't find
>
> > >any hits.
> > >
> > >
> > Not to my knowledge.  Eric checked with one of the committers who said
> > it was ok to borrow the code as long as we cited it.
> >
> > I mentioned talking to the ant guys about this but others said not to
> > bother them until we're done.
> >
> > - sean
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
> > ForwardSourceID:NT0009A85A
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant using commons code/jars

Posted by di...@multitask.com.au.
Ok, but if they wont use it shouldn't we know sooner rather than later?
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


Sean Schofield <ne...@schof.com> wrote on 18/12/2002 03:45:24 AM:

> >
> >
> >Has anyone brought it up on ant-dev?
> >
> >A quick check on the mail archives searching for DateUtils doesn't find 

> >any hits.
> > 
> >
> Not to my knowledge.  Eric checked with one of the committers who said 
> it was ok to borrow the code as long as we cited it.
> 
> I mentioned talking to the ant guys about this but others said not to 
> bother them until we're done.
> 
> - sean
> 
> 
> --
> To unsubscribe, e-mail: 
<ma...@jakarta.apache.org>
> For additional commands, e-mail: 
<ma...@jakarta.apache.org>
> 

> ForwardSourceID:NT0009A85A 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant using commons code/jars

Posted by Sean Schofield <ne...@schof.com>.
>
>
>Has anyone brought it up on ant-dev?
>
>A quick check on the mail archives searching for DateUtils doesn't find 
>any hits.
>  
>
Not to my knowledge.  Eric checked with one of the committers who said 
it was ok to borrow the code as long as we cited it.

I mentioned talking to the ant guys about this but others said not to 
bother them until we're done.

- sean


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant using commons code/jars

Posted by di...@multitask.com.au.
Has anyone brought it up on ant-dev?

A quick check on the mail archives searching for DateUtils doesn't find 
any hits.
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


Sean Schofield <ne...@schof.com> wrote on 18/12/2002 02:10:38 AM:

> >
> >
> >Will Ant start using the code if we do take ownership of it?
> > 
> >
> Probably.  See yesterday's DateUtils thread for more on this topic 
> (we've moved this discussion to that thread.)   We're just getting 
> started so any help/feedback would be appreciated.
> 
> - sean
> 
> 
> --
> To unsubscribe, e-mail: 
<ma...@jakarta.apache.org>
> For additional commands, e-mail: 
<ma...@jakarta.apache.org>
> 

> ForwardSourceID:NT0009A7FE 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Ant using commons code/jars

Posted by di...@multitask.com.au.
Has anyone brought it up on ant-dev?

A quick check on the mail archives searching for DateUtils doesn't find 
any hits.
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


Sean Schofield <ne...@schof.com> wrote on 18/12/2002 02:10:38 AM:

> >
> >
> >Will Ant start using the code if we do take ownership of it?
> > 
> >
> Probably.  See yesterday's DateUtils thread for more on this topic 
> (we've moved this discussion to that thread.)   We're just getting 
> started so any help/feedback would be appreciated.
> 
> - sean
> 
> 
> --
> To unsubscribe, e-mail: 
<ma...@jakarta.apache.org>
> For additional commands, e-mail: 
<ma...@jakarta.apache.org>
> 

> ForwardSourceID:NT0009A7FE 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Sean Schofield <ne...@schof.com>.
>
>
>Will Ant start using the code if we do take ownership of it?
>  
>
Probably.  See yesterday's DateUtils thread for more on this topic 
(we've moved this discussion to that thread.)   We're just getting 
started so any help/feedback would be appreciated.

- sean


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by di...@multitask.com.au.
Will Ant start using the code if we do take ownership of it?
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


Christoph.Reck@dlr.de wrote on 18/12/2002 01:24:33 AM:

> here some pittfalls of the Sun's date utilitites that I encoutnered.
> a) The *parser* in the SimpleDateFormat is not thread safe.
> b) The ParseException acts differently in every version since JDK1.1.7
>     (expliecetly an unusable errorOffset).
> c) It allows negative months and other components, thus fails with
>     ISO8601 abbreviated dates (e.g. --01T00:00Z meaning midnight of
>     every first day in a month)
> d) many more (I had a lot of workarounds to get my application
>     do proper parsing in a controlled input field - thats why JDK1.4
>     no allows qualified input fields with REs!)
> 
> I took a quick look at Joda's date parser and saw it has its own
> engine.
> 
> I believe the commons one should lean onto the syntax of the java's,
> such that should allow it as a bug free plug-in replacement of Sun's.
> 
> What do others think? I need to take a look at Ant's code. Maybe
> I'll take the leap and start a working bug free plug-in replacement
> of Sun's SimpleDateFormat if no one has taken the lead...
> 
> Cheers,
> Christoph
> 
> 
> Sean Schofield wrote:
> >>
> >>
> >>> Please be warned, that Date is a fragile/controversial issue, since
> >>> 1. The java SimpleDateFormatter is not thread safe
> >>> 2. Dates have many locale specific representation.
> >>> 
> >>
> >> Indeed, Sun's dates are pretty rubbish. Joda has a 0.8 release, which 
has
> >> thread safe formatting including time zone handling and locale 
> >> handling. It
> >> still needs more work though.
> >>
> >> Stephen
> >>
> >> 
> >>
> > What is not thread safe about SimpleDateFormatter?  If this is true 
that 
> > seems kind of serious!  (I will take a look at the source tonight but 
it 
> > might help if you gave me a hint)
> > 
> > Anyways, this thread safety business sounds like something that might 
be 
> > useful to a lot of programmers out there.  I will take a look at what 
> > you've done in joda and see if I can't figure it out.  Maybe we could 
> > make a thread-safe version of SimpleDate Formatter be part of the 
> > proposed TimeUtils/DateUtils/whatever in commons-lang?
> > 
> > Thoughts?
> > 
> > - sean
> > 
> > 
> > -- 
> > To unsubscribe, e-mail: 
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail: 
> > <ma...@jakarta.apache.org>
> > 
> > 
> 
> -- 
> :) Christoph Reck
> 
> 
> --
> To unsubscribe, e-mail: 
<ma...@jakarta.apache.org>
> For additional commands, e-mail: 
<ma...@jakarta.apache.org>
> 

> ForwardSourceID:NT0009A73A 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Ch...@dlr.de.
here some pittfalls of the Sun's date utilitites that I encoutnered.
a) The *parser* in the SimpleDateFormat is not thread safe.
b) The ParseException acts differently in every version since JDK1.1.7
    (expliecetly an unusable errorOffset).
c) It allows negative months and other components, thus fails with
    ISO8601 abbreviated dates (e.g. --01T00:00Z meaning midnight of
    every first day in a month)
d) many more (I had a lot of workarounds to get my application
    do proper parsing in a controlled input field - thats why JDK1.4
    no allows qualified input fields with REs!)

I took a quick look at Joda's date parser and saw it has its own
engine.

I believe the commons one should lean onto the syntax of the java's,
such that should allow it as a bug free plug-in replacement of Sun's.

What do others think? I need to take a look at Ant's code. Maybe
I'll take the leap and start a working bug free plug-in replacement
of Sun's SimpleDateFormat if no one has taken the lead...

Cheers,
Christoph


Sean Schofield wrote:
>>
>>
>>> Please be warned, that Date is a fragile/controversial issue, since
>>> 1. The java SimpleDateFormatter is not thread safe
>>> 2. Dates have many locale specific representation.
>>>   
>>
>> Indeed, Sun's dates are pretty rubbish. Joda has a 0.8 release, which has
>> thread safe formatting including time zone handling and locale 
>> handling. It
>> still needs more work though.
>>
>> Stephen
>>
>>  
>>
> What is not thread safe about SimpleDateFormatter?  If this is true that 
> seems kind of serious!  (I will take a look at the source tonight but it 
> might help if you gave me a hint)
> 
> Anyways, this thread safety business sounds like something that might be 
> useful to a lot of programmers out there.  I will take a look at what 
> you've done in joda and see if I can't figure it out.  Maybe we could 
> make a thread-safe version of SimpleDate Formatter be part of the 
> proposed TimeUtils/DateUtils/whatever in commons-lang?
> 
> Thoughts?
> 
> - sean
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 
> 

-- 
:) Christoph Reck


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Sean Schofield <ne...@schof.com>.
>
>
>>Please be warned, that Date is a fragile/controversial issue, since
>>1. The java SimpleDateFormatter is not thread safe
>>2. Dates have many locale specific representation.
>>    
>>
>Indeed, Sun's dates are pretty rubbish. Joda has a 0.8 release, which has
>thread safe formatting including time zone handling and locale handling. It
>still needs more work though.
>
>Stephen
>
>  
>
What is not thread safe about SimpleDateFormatter?  If this is true that 
seems kind of serious!  (I will take a look at the source tonight but it 
might help if you gave me a hint)

Anyways, this thread safety business sounds like something that might be 
useful to a lot of programmers out there.  I will take a look at what 
you've done in joda and see if I can't figure it out.  Maybe we could 
make a thread-safe version of SimpleDate Formatter be part of the 
proposed TimeUtils/DateUtils/whatever in commons-lang?

Thoughts?

- sean


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Stephen Colebourne <sc...@btopenworld.com>.
> Seems that Stephen has taken another approach to this (see the posts
> in this thread). Maybe someone takes a look to see if the two versions
> in rupert can be explited and deprecated in favor of CalendarUtils
> or joda.
Parts of these classes could be deprecated to Joda, but Joda is much bigger.


> Please be warned, that Date is a fragile/controversial issue, since
> 1. The java SimpleDateFormatter is not thread safe
> 2. Dates have many locale specific representation.
Indeed, Sun's dates are pretty rubbish. Joda has a 0.8 release, which has
thread safe formatting including time zone handling and locale handling. It
still needs more work though.

Stephen


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Ch...@dlr.de.
Hi,

an first hit at this in the commons land was in:
http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/rupert/src/java/org/apache/commons/rupert/christoph/IsoDateTool.java?rev=HEAD
http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/rupert/src/java/org/apache/commons/rupert/nathan/DateTool.java?rev=HEAD

To my knowledge, Nathan's tool is also in the velocity tools section
and recieved some enhancements there.

Seems that Stephen has taken another approach to this (see the posts
in this thread). Maybe someone takes a look to see if the two versions
in rupert can be explited and deprecated in favor of CalendarUtils
or joda.

Please be warned, that Date is a fragile/controversial issue, since
1. The java SimpleDateFormatter is not thread safe
2. Dates have many locale specific representation.


BTW. I also have a *very* pretty Calendar tool in Swing and an
updated/modified one in JavaScript for HTML usage. Please contact me
if you are interested (see the JavaScript version in action under
the pop-up arrow in the corresponding fields in http://www.eoweb.de
"Catalog Search" page; the Swing version is used in an internal
application, but also will appear soon when that site is updated).

I'm willing to contribute my ButtonFactoryServlet (see it in another
thread named "Re: button factory) and CalendarView if someone asists
me in placing it in Jakarta or SourceForge.

Cheers,
Christoph

Sean Schofield wrote:
> Greetings.
> 
> I'm new to the commons-dev list and I've been throwing out ideas of 
> where I might be able to make my first open source contribution.
> 
> Has anyone thought about a possible TimeUtils package with commons.lang? 
> There a variety of time-related utilities that I've been working on that 
> might be useful.  Any thoughts on this before I get too specific in my 
> suggestions?
> 
> Sean
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 
> 

-- 
:) Christoph Reck


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Henri Yandell <ba...@generationjava.com>.
Oh, welcome to the party by the way :)

On Fri, 13 Dec 2002, Sean Schofield wrote:

> Greetings.
>
> I'm new to the commons-dev list and I've been throwing out ideas of
> where I might be able to make my first open source contribution.
>
> Has anyone thought about a possible TimeUtils package with commons.lang?
>  There a variety of time-related utilities that I've been working on
> that might be useful.  Any thoughts on this before I get too specific in
> my suggestions?
>
> Sean
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Sean Schofield <ne...@schof.com>.
Stephen Colebourne wrote:

>There is a CalendarUtils class already in the [lang-sandbox] that you might
>want to look at.
>  
>
Will do.  I will report back after I take a look at what's there in the 
sandbox.  Thanks for the tip.  (Also I will be checking out your site 
for the joda stuff.)


Eric,

Is this something you'd be interesting in helping out on or were you 
just supporting the idea?

- sean



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Stephen Colebourne <sc...@btopenworld.com>.
There is a CalendarUtils class already in the [lang-sandbox] that you might
want to look at.

http://joda.sourceforge.net is where I have quite an extensive time/date
rewrite project underway. But we'll always take a look at ideas. Simple
utils for java dates and times probably fit in [lang], more complex things
are probably better in Joda.

Stephen

> Stephen's our expert here as his joda project has an extensive time system
> in. There is a TImeUtils/CalendarUtils idea floating around a bit, but it
> needs to remain simple and not grow into a large system [which by
> experience, Stephen has shown us can happen].
>
> But feel free to throw in the ideas, the more the merrier. It's an area I
> think we all have little helpful utils in and trying to find a common set
> would be good.
>
> Hen
>
> On Fri, 13 Dec 2002, Sean Schofield wrote:
>
> > Greetings.
> >
> > I'm new to the commons-dev list and I've been throwing out ideas of
> > where I might be able to make my first open source contribution.
> >
> > Has anyone thought about a possible TimeUtils package with commons.lang?
> >  There a variety of time-related utilities that I've been working on
> > that might be useful.  Any thoughts on this before I get too specific in
> > my suggestions?
> >
> > Sean
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [lang] Has anyone thought about a TimeUtils package?

Posted by Henri Yandell <ba...@generationjava.com>.
Stephen's our expert here as his joda project has an extensive time system
in. There is a TImeUtils/CalendarUtils idea floating around a bit, but it
needs to remain simple and not grow into a large system [which by
experience, Stephen has shown us can happen].

But feel free to throw in the ideas, the more the merrier. It's an area I
think we all have little helpful utils in and trying to find a common set
would be good.

Hen

On Fri, 13 Dec 2002, Sean Schofield wrote:

> Greetings.
>
> I'm new to the commons-dev list and I've been throwing out ideas of
> where I might be able to make my first open source contribution.
>
> Has anyone thought about a possible TimeUtils package with commons.lang?
>  There a variety of time-related utilities that I've been working on
> that might be useful.  Any thoughts on this before I get too specific in
> my suggestions?
>
> Sean
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>