akeeba/fof — pull request #289 by roland-d (2014-02-26 09:33:31+00:00)
Title: Handle empty and default calendar values

Currently when you use the calendar field and there is no value a few things can happen. Having not set a format in the XML gives you a date like this:
-0001-11-30

Having set a format like %d-%m-%Y yields this error:
DateTime::__construct(): Failed to parse time string (30-11--0001) at position 0 (3): Unexpected character

This change checks if the value is empty or if an empty date/datetime stamp is received. If so it either applies a default setting which can be set in the XML or if not set it falls back to 0. Going back to 0 will show a normal timestamp of 1 January first 1970 which is better than -0001-11-30 :)

Being able to use a default timestamp of now, you can have the date set to the current timestamp.