Time Period set to Last Xyz throws MySQL error

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=34006&start=0

$nowDate will be quoted in function $query->dateAdd(...).
Merge pull request #4017 from illovo/patch-4

[#34006] Time Period set to Last Xyz throws MySQL error