Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Unnamed
2012 year 5 month 3 day Thursday 09:57:00 MDT 

  1. Specification:
  2.  
  3. PaydateCalculator:
  4.  
  5. Write a class in PHP5 OOP called MyPaydateCalculator, that can be ran in the most recent version of PHP without syntax errors or warnings (notices are okay), that uses the provided interface (PaydateCalculator.php). The goal of the Paydate Calculator is to give the next 10 paydates given two paydates, and a paydate model.
  6.  
  7. Rules:
  8. * A valid paydate is a date that is neither a holiday or a weekend.
  9. * If a paydate falls on a weekend, increase date until a valid date is reached.
  10. * If a paydate falls on a holiday, decrease date until a valid date is reached.
  11. * Holiday adjustment takes precedence over weekend adjustment
  12. * The two given paydates given to your class will not be adjusted by weekends or a holiday
  13. * "next" paydate cannot be today
  14.  
  15. Holidays (2012-2013):
  16. 1/2/2012                                                                                                                                                                                                                                                                     
  17. 1/16/2012                                                                                                                                                                                                                                                                     
  18. 2/20/2012                                                                                                                                                                                                                                                                     
  19. 5/28/2012                                                                                                                                                                                                                                                                     
  20. 7/4/2012                                                                                                                                                                                                                                                                     
  21. 9/3/2012                                                                                                                                                                                                                                                                     
  22. 10/8/2012                                                                                                                                                                                                                                                                     
  23. 11/12/2012                                                                                                                                                                                                                                                                   
  24. 11/22/2012                                                                                                                                                                                                                                                                   
  25. 12/25/2012                                                                                                                                                                                                                                                                   
  26. 1/1/2013                                                                                                                                                                                                                                                                     
  27. 1/21/2013                                                                                                                                                                                                                                                                     
  28. 2/18/2013                                                                                                                                                                                                                                                                     
  29. 5/27/2013                                                                                                                                                                                                                                                                     
  30. 7/4/2013                                                                                                                                                                                                                                                                     
  31. 9/2/2013                                                                                                                                                                                                                                                                     
  32. 10/14/2013                                                                                                                                                                                                                                                                   
  33. 11/11/2013                                                                                                                                                                                                                                                                   
  34. 11/28/2013                                                                                                                                                                                                                                                                   
  35. 12/25/2013
  36.  
  37.  
  38. Paydate Models:
  39.  
  40. MONTHLY   - A person is paid on the same day of the month every month, for instance, 1/17/2012 and 2/17/2012
  41. BIWEEKLY  - A person is paid on the same day of the week every other week, for instance, 4/6/2012 and  4/20/2012
  42. WEEKLY    - A person is paid on the same day of the week every week, for instance 4/9/2012 and 4/16/2012

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

fantasy-obligation