Calcualte Relative Date from Today (Leap Year Aware)
Category:Dates and Math
Version Compatibility: Visual Basic 6
This function is to be used when you want to calculate a date relative to the current date and you need the function to be aware of the leap year. Example: If you are calculating someones birthday for next year and next year is a leap year, unless their birthday occurs before Feb,29, the standard DateAdd function in Visual Basic will be one day off. If you use this function, it will return the correct date, relative to this one. If you find a bug with this code, please by all means send me an email at email@example.com
Instructions: Copy the declarations and code below and paste directly into your VB project.