date: add comments for all methods

Add comments for all methods.

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