add some algorithms for date arithmetic
create date paging format