commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Caswell" <st...@mungoknotwise.com>
Subject RE: [lang] DateUtils round and truncate functionality with Calendar.AM_PM
Date Sun, 03 Aug 2003 23:45:46 GMT
I don't know that rounding to AM_PM makes sense. I'm having a difficult time
coming up with any rounding scenario that makes sense. I think it makes
sense to say that the boundary is 12:00PM, and that times before that value
cause round down, and times after that value cause round up.

But what does "round down" mean? What does "round up" mean? Maybe someone
who has a use case for this functionality can provide a good suggestion.

Steven Caswell
steve@mungoknotwise.com
a.k.a Mungo Knotwise of Michel Delving
"One ring to rule them all, one ring to find them..."


> -----Original Message-----
> From: Stephen Colebourne [mailto:scolebourne@btopenworld.com] 
> Sent: Sunday, August 03, 2003 6:32 PM
> To: Jakarta Commons Developers List; steve@mungoknotwise.com
> Subject: Re: [lang] DateUtils round and truncate 
> functionality with Calendar.AM_PM
> 
> 
> I don't know what it should do offhand. Perhaps you could 
> suggest sensible behaviour?
> 
> Stephen
> 
> ----- Original Message -----
> From: "Steven Caswell" <steve@mungoknotwise.com>
> Does anyone  know how the DateUtils methods round and 
> truncate are suppose to behave when passed Calendar.AM_PM? 
> I've tried several combinations of round, and they all seem 
> to truncate instead. There is nothing in the Javadocs for 
> these methods about the expected result, and I'm not able to 
> tell if the methods are working properly.
> 
> 
> Steven Caswell
> steve@mungoknotwise.com
> "In our own native land, in defense of the freedom that is 
> our birthright, and which we ever enjoyed till the late 
> violation of it -- for the protection of our property, 
> acquired solely by the honest industry of our fore-fathers 
> and ourselves, against violence actually offered, we have 
> taken up arms. We shall lay them down when hostilities shall 
> cease on the part of the aggressors, and all danger of their 
> being renewed shall be removed, and not before." - Thomas Jefferson
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 
> 
> 



Mime
View raw message