SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Location
    London, UK
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need to find the the first non-holiday and non-weekend date

    Given a date i need to determine if x days from this date is a holiday or a weekend. If it is, i have to get the first non-holiday or non-weekend date. I will like to do this for different countries. I am using php 4 version.
    Prov. 13:20 - He that walketh with wise men shall be wise: but a
    companion of fools shall be destroyed

  2. #2
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    ...

    You would need a list of these holidays in a standard format, then simply create the future date and check against your list for its presence.

    Now, how you go about creating this definitive list of local & global holidays will be the issue.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Location
    London, UK
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SilverBulletUK View Post
    ...
    Now, how you go about creating this definitive list of local & global holidays will be the issue.
    That is the problem that I need a solution for.
    Prov. 13:20 - He that walketh with wise men shall be wise: but a
    companion of fools shall be destroyed

  4. #4
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Could it be PEAR Date Holidays?

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,871
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Is there any day of the year that isn't a holiday somewhere?
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

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