add format_date method