breaux
9 years agoContributor
Dynamic date REST parameter?
Is there any way to define a REST parameter that will automatically take like tomorrow's date?
I tried this, but don't know what's really possible or what the syntax would be for more complicated steps:
${=import java.util.Calendar; Calendar now=Calendar.getInstance(); now = now.add(Calendar.DATE, 1); new java.text.SimpleDateFormat("yyyy-MM-dd").format(now.getTime())}
According to the raw value, "now" is null when now.getTime() is called.
Or, this seemed to give the next days date and could be inserted as a REST parameter:
${=def now = new Date();now++;now.format("yy-MM-dd")}