Login +

Documentation

SLS_Date::isDate

Since SillySmart 1.0

Description

Check that date is in date format (yyyy-mm-dd)Warning: only check syntactically the date (not gregorian)
static bool isDate ( string $date);

Parameters

  • string $date
    the date to check

Return

bool $valid
true if yes, else false

Exemples

  •  var_dump(SLS_Date::isDate("1986-04-30"));
     // will produce : true
  •  var_dump(SLS_Date::isDate("1986-04-3"));
     // will produce : false

Comments

No comment on this function, be the first !

Add your comment

You must login/register to post a reply.