Refactor DateFmt implementation, add comments