Format years correctly when negative. Fixes #1254.