Login +

Documentation

SLS_Date::isDateTime

Since SillySmart 1.0

Description

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

Parameters

  • string $date
    the date to check

Return

bool $valid
true if yes, else false

Exemples

  •  var_dump(SLS_Date::isDateTime("1986-04-30 12:22:10"));
     // will produce
     true
  •  var_dump(SLS_Date::isDateTime("1986-04-30 12:22:1"));
     // will produce
     false

Comments

No comment on this function, be the first !

Add your comment

You must login/register to post a reply.