commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31602] - [lang] DateUtils should be able to adjust for weekends, etc.
Date Fri, 15 Oct 2004 01:38:11 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31602

[lang] DateUtils should be able to adjust for weekends, etc.





------- Additional Comments From sean.schofield@gmail.com  2004-10-15 01:38 -------
I'm not sure what the problem is with the public int[].  Yes it can be 
modified by anyone but what is the harm or purpose of that?  I do agree with 
your point about the fix (inner classes) being worse than the cure.  Obviously 
this would be a perfect case for type safe enums which could be declared final.

I don't have an objection to reverting back to the original idea of assuming 
weekend to be Saturday or Sunday (and documenting this assumption.)

I see your point about including Calendar as well as Date.  Also point well 
taken about the Calendar.getInstance().  I don't know why my implementation 
was inconsistent on that point.

Finally, I prefer adjustUntilNotWeekend and adjustUntilNotDays as the method 
names (instead of addDaysIgnoreWeekend.)  This is assuming we are talking 
about the same method I initially proposed.  The point of the method is to 
ensure the Date is not a weekend.  So if it is already not a weekend no adding 
(or subtracting) is needed.  So for this reason I think your method name 
change might be a bit misleading.  Of course, I may be misinterpreting your 
point here...

Shall I work up some new patches along these lines?

---------------------------------------------------------------------
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