date: introduce two class methods

1) prevDate: return previous date.
2) getSetPrevDate: return previous date and set current date to it.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
test: add new tests for Date.

Add tests using prevDate() and getSetPrevDate().

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>