Re: Calculating days using Business Days for the Calendar

Discussion in 'Python' started by Gerrit, Sep 20, 2004.

  1. Gerrit

    Gerrit Guest

    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/
     
    Gerrit, Sep 20, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Stockwell
    Replies:
    2
    Views:
    731
    Anna Martelli Ravenscroft
    Sep 20, 2004
  2. Terry Reedy
    Replies:
    0
    Views:
    447
    Terry Reedy
    Sep 20, 2004
  3. clintonb
    Replies:
    9
    Views:
    937
    James Kanze
    May 23, 2007
  4. krishnakant Mane
    Replies:
    7
    Views:
    485
    Shane Geiger
    Oct 16, 2007
  5. Phrogz
    Replies:
    2
    Views:
    153
    Phrogz
    Apr 6, 2007
Loading...

Share This Page