dcsimg
www.webdeveloper.com
Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22

Thread: Adding business days to current date

  1. #16
    Join Date
    Oct 2010
    Location
    Versailles, France
    Posts
    1,276
    The error does not occur at 2 am but between 11 pm and 1 am, when you add 86400 seconds with a shorter or longer day !

  2. #17
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,439
    Quote Originally Posted by 007Julien View Post
    The error does not occur at 2 am but between 11 pm and 1 am, when you add 86400 seconds with a shorter or longer day !
    OK. I'll avoid any calculations those 2 hours in the middle of the night twice a year.

  3. #18
    Join Date
    Oct 2010
    Location
    Versailles, France
    Posts
    1,276
    This is fine, but how to ensure that all users will do the same?

  4. #19
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,439
    Quote Originally Posted by 007Julien View Post
    This is fine, but how to ensure that all users will do the same?
    I've already indicated that you provided a good solution for adding days way back in post #15.
    I'm not sure what else you want me to do. The original OP will need to decide which script to use.

    I still fail to see the importance of a 2 hour interval that happens in the middle of the night twice a year.
    If the calculation of a 24 hour day is that important to the final results, I would probably not use a JS solution.

    I would use your solution for the addDays() function, but that is not what the the OP was asking for.
    He/She asked for a business day counter that would possibly include holidays. That is what I provided.
    And since the daylight saving change occurs during the weekends,
    personally, I would not be concerned with the 2 hour interval.

    Are you a banker who subs during the night shift during the daylight saving changes?
    If so, then you would be the one user I would fail to please.

    Have a great day!

  5. #20
    Join Date
    Oct 2010
    Location
    Versailles, France
    Posts
    1,276
    I just wanted to say, after seeing many scripts using the length of the day, it often led to erroneous scripts...

    Errors are more insidious when infrequent !
    Last edited by 007Julien; 01-25-2014 at 02:06 PM.

  6. #21
    Join Date
    Jan 2014
    Posts
    5
    Thank you everyone for the help with this. I have updated the site to account for business days and I learned quite a bit.

  7. #22
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,439
    Quote Originally Posted by shaun.101 View Post
    Thank you everyone for the help with this. I have updated the site to account for business days and I learned quite a bit.

    Did the answers satisfy your need for holiday exclusions?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles