Bug 24455: Add JS functions to format date and datetime strings