Added test for date formatting method