I'm trying to use a variable for the number of days in my call to DateUtil.addDays
, but it's not working. Am I missing something simple, or does it just not work?
//Example:
x = 10 //this int is the result of some math, and changes frequently
y = Thu Aug 31 00:00:00 MST 2017 //this is the date
z = DateUtil.addDays(y, x) //This will error.
z = DateUtil.addDays(y, 10) //This works.