Use shared date formatter
Fixed bug with constant definitions