Here are some of the more common classes and functions I use.
Ruby: Date Tools
PHP: Paydate Calculator
A PHP class for calculating the next pay date based on the following rules:
The paydate will be at least 10 days in the future from the original day the loan was funded and will fall on a day that is based on their paydate model specified by 'weekly', 'bi-weekly', or 'monthly' unless the date must be adjusted forward to miss a weekend or backward to miss a holiday, holiday adjustment taking precedence over weekend.Flowchart · Code · Testing Code
Please note: While working out difficult programming problems is a particular joy, it is the exception. The code above is meant to show neither originality nor complexity, but to represent the quality of code that can be expected from me. Be sure to contact me with any questions or comments.
By the way, all code is free to use for whatever purpose, as long as you keep the copywrite notice intact.