Calculating days using Business Days for the Calendar

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Stockwell

    #1

    Calculating days using Business Days for the Calendar

    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.weekd ay()
    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


    David
    -------
    Surf a wave to the future with a free tracfone


    _______________ _______________ _______________ _______________ _____
    FREE pop-up blocking with the new MSN Toolbar – get it now!


  • Robin Becker

    #2
    Re: Calculating days using Business Days for the Calendar

    David Stockwell wrote:[color=blue]
    > 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.weekd ay() 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
    >
    >
    > David
    > -------
    > Surf a wave to the future with a free tracfone
    > http://cellphone.duneram.com/index.html
    >[/color]
    .... ReportLab's version of jeff Bauer's normalDate module has a BusinessDate
    object which does businessday diffs etc etc.

    --
    Robin Becker

    Comment

    Working...