Nice use of the php date and time functions, they are pretty handy for this type of stuff. All looks good to me if you are getting the result you are hoping for I would say this is a success. I think this will definitely benefit other users that are looking into this type of feature.