rose.date: fix invalid local name

`d` is not defined in the local scope.