Since Date is used only once, drop it from the closure.
Rename 'replaceall' to 'replaceAll'.