Closed (fixed)
Project:
Date
Version:
6.x-2.3
Component:
Date API
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2009 at 05:53 UTC
Updated:
30 Nov 2009 at 18:55 UTC
I have a DATE_DATETIME variable that I would like to add a week to. Is there a function that will add a week or a certain number of days to a given date and return the new DATE_DATETIME?
It seems a pain to deal with month/year boundaries and leap years give me a headache. I was thinking there must be a function that can add a week to a date to support the repeating date api but I can't seem to find anything. A pointer or suggested approach would be much appreciated.
Thanks in advance.
Comments
Comment #1
carlwohlforth commentedI ended up writing my own function using date_days_in_month ($y, $m); As long at that one deals with leap years properly I'm good to go.