Ported date formating capabilities for Xtemplate