Callable date formatter

Replaces #2507.