Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

GregorianCalendar - # of work days  RSS feed

 
Ali Ekber
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!