Fix issue #2 : Add date format function and fix template