silverstripe/sapphire — pull request #202 by halkyon (2012-02-24 07:47:35+00:00)
Title: Date changes

setValue() on Date and SS_Datetime will set 1970-01-01 when passing in NULL, false or empty string after processing the value with strtotime(). Set the value to NULL if NULL, false or empty string values are passed in, so the database doesn't save incorrect data.

Casting methods in Datetime are also now consistent with Date, by checking for a value.

Ordinal suffix for DayOfMonth and RangeString now supported as an additional argument.