DateTime.hasYear

class DateTime
bool
hasYear
()

Return Value

Type: bool

TRUE if datetime<!-- -->'s year field is set (which should always be the case), otherwise FALSE