add date function from post.html