Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Calculating days using Business Days for the Calendar

Reply
Thread Tools

Re: Calculating days using Business Days for the Calendar

 
 
Gerrit
Guest
Posts: n/a
 
      09-20-2004
David Stockwell wrote:
> I''m wondering if the Calendar object has an option to only do calculations
> based on business days (ie M-F). Additionally does it have a way to get
> holidays into itself?
>
> Currently I'm considering converting my calculations over to business days
> and am wondering if there is anything built-in. I've tried searching but
> so far haven't seen such a thing built in.
>
> I'm thinking I'm just going to have to bite the bullet and create my own
> approach to
> 1) figure out the day of the week of my starting date (Calendar.weekday()
> should do the trick)
> 2) determine the number of days up to my finish date (i do that now)
> 3) determine the number of non-business days (weekends + holidays)
> 4) subtract off the number in #3 from #2


Maybe the external module ''DateUtil'' (Google for it) can help you. It
is quite advanced in many aspects.

Gerrit.

--
Weather in Twenthe, Netherlands 20/09 17:25:
13.0°C wind 8.9 m/s SSW (57 m above NAP)
--
Gerrit Holl - 2nd year student of Applied Physics, Twente University, NL.
Experiences with Asperger's Syndrome:
EN http://topjaklont.student.utwente.nl/english/
NL http://topjaklont.student.utwente.nl/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
confused on calculating date difference in days. krishnakant Mane Python 7 10-16-2007 02:17 PM
Calculating number of days between two dates. clintonb C++ 9 05-23-2007 09:32 AM
Calculating Business Hours Left Phrogz Ruby 2 04-06-2007 02:24 PM
Re: Calculating days using Business Days for the Calendar Terry Reedy Python 0 09-20-2004 10:44 PM
Calculating days using Business Days for the Calendar David Stockwell Python 2 09-20-2004 09:58 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57