[TYPO3-mvc] Validation of non-mandatory DateTime fields
Franz Koch
typo3.RemoveForMessage at elements-net.de
Wed May 18 15:40:38 CEST 2011
Hey,
> This is not really nice, because it means the model is not entirely
> consistent (the setter uses an integer, the getter a DateTime object),
> but didn't come across any issue using this and it's convenient to have
> a DateTime object instead of a timestamp, because I have other fields
> defined as DateTime objects.
>
> Of course, I could also have worked entirely with integers/timestamps.
> Maybe time will prove me wrong ;-)
If you don't feel good about it, you could of course also add a
additional getter, so instead of getTimestampProperty some additional
getPropertyAsDatetime (of course with better namings if your domain
allows this).
But I agree - the DateTime handling should be improved.
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list