datetime: Fix crash when setting year to 0

https://bugzilla.gnome.org/show_bug.cgi?id=735352