Fix undefined variable offsetDays.

Browser will throw "Uncaught ReferenceError" when using strict mode.