Ok, question time.

I have a date being stuck into a JS function from ASP

the resultant code is:

recordDate = '10/18/2002'
I then need to subtract a day from recordDate if the curent hour is less then 3 (using military time, so 3AM).

So I have:

if hour less then 3
  recordDate = recordDate - 1;
this gives an error.

I know I can do this because I am fairly sure I have done this before. However, I simply cannot find code to do it. I have searched here to no avail.

Thanks for the help,