Add method format to Date

With unit tests