symfony API

sfDateValidator Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to API menu


You are currently browsing the symfony API for the 1.0 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfDateValidator verifies a parameter is of a date format.


sfDateValidator  <  sfValidator

Method Summary

  • bool execute(, )
    Execute this validator.
  • getValidDate(, )
    Converts the given date into a Unix timestamp.
  • bool initialize(, )
    Initializes the validator.

Methods inherited from sfValidator

execute , getContext , getParameter , getParameterHolder , hasParameter , initialize , setParameter

Method Details

  • (bool) execute (, )

    Execute this validator.

    returns true, if this validator executes successfully, otherwise false

  • getValidDate (, )

    Converts the given date into a Unix timestamp.

    Returns null if the date is invalid

  • (bool) initialize (, )

    Initializes the validator.

    returns true, if initialization completes successfully, otherwise false