Created
July 28, 2017 03:41
-
-
Save Tenderfeel/4899c1dcb0bcce62fa36bed2334a0573 to your computer and use it in GitHub Desktop.
RFC 3339日付チェック
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 characters
//日時チェック(RFC 3339形式) | |
//@param value {string} datetime-local.value | |
function checkDatetime(value) { | |
return(!/20[0-9]{2}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]/.test(value)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment