Ask questions via twitter! Message any question to @answers on twitter. We'll publish the question and send you a reply each time there's a new answer.
Next Question

Answered Question

 
M$2 December 21, 2008 06:53 AM

I need a PHP function that calculates the number of work days (Mon-Fri) so far this month.

There is something similar at http://www.webmasterworld.com/php/3207166.htm , but it is working from a different perspective. I was to call a function that says there have been 15 work days so far this month. If it allow for a list of public holidays, all the better.
Interesting Question?  Yes (0)   No (0)   
RSS
 
 

Best Answer  Chosen by Asker

 
December 21, 2008 07:50 AM
Ya didnt know only 110 charecters
I have the code here ..
http://avinasha1987.googlepages.com/myphpfunctions
Source(s):
I used php.net manual and about.com for coming up with this code

Asker's Rating:
• Great work. There seems to be a bit of a bug in the holidays part, but it does what I need for the moment, thank you.


Helpful Answer?  (0)   (0)    Tip harravi for this answer
Permalink | Report
   Reply  
 
 
 
December 21, 2008 07:54 AM
Hmm, seems Mahalo is having problems with your answer, but I'd love to see your answer if you can try posting it again..

Thanks for the link, great work!

Report
 
 
 
December 21, 2008 08:55 AM
No problem. Any time

Report
 
 

Other Answers (4)

Sort By
 
December 21, 2008 07:08 AM
in the link you have given try replacing return $workingDate with return $daysSoFar

Helpful Answer?  (0)   (0)    Tip garryvictor1 for this answer
Permalink | Report
   Reply  
 
 
 
December 21, 2008 07:11 AM
here are my contributions:
Source(s):
http://www.hotscripts.com/PHP/Scripts_and_Programs/Calculators/index.html
http://www.hotscripts.com/PHP/Scripts_and_Programs/Calendars/index.html

Just browse the site for the information you need


Helpful Answer?  (0)   (0)    Tip druids for this answer
Permalink | Report
   Reply  
 
 
 
December 21, 2008 08:39 AM
Calculate number of work days between 2 dates

The call to fill the Holidays array has Western Australian holidays in it, but I'm sure you can still get the idea.

http://snippets.dzone.com/posts/show/807

Helpful Answer?  (0)   (0)    Tip bugsy for this answer
Permalink | Report
   Reply  
 
 

Answer this Question

How tips and payments work

This question has already been resolved. You may add an answer to it but you will not be eligible to win best answer or any associated tips.

Ask a Question


140 characters left
Top of Page
Buy Mahalo Dollars with Credit Card or PayPal

Top Members

This Week All Time
  • buddawiggi
    buddawiggi
    2nd Degree Black Belt
    27115 Points
    M$783.09 Earned
  • kty2777
    kty2777
    Purple Belt with a Brown Tip
    5444 Points
    M$199.92 Earned
  • opher
    opher
    Purple Belt
    4166 Points
    M$187.17 Earned
   See All
 

Most Popular Tags

mahalo(1599)
iphone(462)
music(459)
google(355)
food(320)
online(294)
beer(279)
money(262)
movies(255)
apple(251)
aotd(235)
health(217)
video(207)
dog(205)
free(203)
   See All
 

Categories

Welcome New Members


 
 
Mahalo Dollars are the currency of Mahalo Answers.

Each Mahalo Dollar costs $1.

Once you earn more than 40 Mahalo Dollars, you can request to be paid via PayPal. Each Mahalo Dollar is currently worth $0.75 when paid out via PayPal. Learn More

 
 

Please log in to use this function.