====== Old version, recommended against! ======== Passing dates as dates into a script can cause odd behaviour in JavaScript. This demonstrates passing them as text, then converting in JavaScript to circumvent those issues.
SCRIPT( ` start < end `, 'start',TEXTTODATE('2012-08-01','yyyy-MM-dd'), 'end',TEXTTODATE('2012-08-23','yyyy-MM-dd'))
The example you posted before suffers from issues that result from this. My solution is to convert the date to a string, and convert the string to a date inside the javascript. This fixes the issue.