learn java
The moose likes Java in General and the fly likes GregorianCalendar - # of work days Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "GregorianCalendar - # of work days" Watch "GregorianCalendar - # of work days" New topic

GregorianCalendar - # of work days

Ali Ekber
Ranch Hand

Joined: Jun 12, 2005
Posts: 41
Is it possible to calculate the number of work days, say between Apr. 15, 2006 and Jan 20, 2007? I can calulate the number of days, but need Monday-Friday number of days (work days with no holidays)? Thanks.
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
What if you identify the closest Sunday to April 15 and the closest Saturday to January 20, and calculate the total number of weeks and from that the total number of days. Then you could subtract 2 days for each week as well as the number of days you added on.
Have you tried LearnNowOnline? http://www.learnnowonline.com/
subject: GregorianCalendar - # of work days