-extracted date format into js lib
-added js lib to main template