Created
December 4, 2016 15:13
-
-
Save amirasaran/708468de9d6b8bbba14d6b22cab9f20d to your computer and use it in GitHub Desktop.
Revisions
-
amirasaran created this gist
Dec 4, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ function is_date_time($value){ if (preg_match("/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T|\s]{1}([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/",$value)) { return true; }else{ return false; } }