date function changes in 2.2?

A variable and a foundset has nothing todo with each other, you can duplicate a foundset, by calling:
var copyFS = controller.duplicateFoundset()

If you want to make a copy from a date object use:
var newDate = new Date(otherDate)