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 Android Security Essentials Live Lessons this week in the Android 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.
Don't get me started about those stupid light bulbs.
subject: GregorianCalendar - # of work days
Similar Threads
J2EE project in Eclipse
onLoad function
Parsing dates
Need to find diff between two dates : - 60 days
How do demo softwares expire?