Last active
April 30, 2020 21:46
-
-
Save amitgupta15/80ed6d59a853e70f6ef62a1b3c0baeda to your computer and use it in GitHub Desktop.
Front End Test Blog - app.js
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
(function () { | |
'use strict'; | |
// Create a global variable and expose it to the world | |
var $myapp = {}; | |
self.$myapp = $myapp; | |
$myapp.isValidDate = function (dateString) { | |
var dateRegex = /(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d/gi; | |
return dateRegex.test(dateString); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment