date: add two methods and update code.

1) Add getDateNextDays() to return the date by next number of days.
2) Add getDatePrevDays() to return the date by previous number
   of days.
3) Rename _formatRetDate() to _dateToString().
4) Update all date comparison uising _dateToString().
5) Add tests for getDateNextDays() and getDatePrevDays().

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