-
Notifications
You must be signed in to change notification settings - Fork 0
MDY3
Giuseppe Cannella edited this page Jan 10, 2019
·
1 revision
Type name | example |
---|---|
MDY3 | 01/01/1900 |
import com.github.gekomad.regexcollection.MDY3
import com.github.gekomad.regexcollection.Validate.validate
assert(validate[MDY3]("2sdf.0") == None)
assert(validate[MDY3]("1/12/1902") == None)
assert(validate[MDY3]("12/31/2018") == Some("12/31/2018"))
assert(validate[MDY3]("12/31/9999") == Some("12/31/9999"))
assert(validate[MDY3]("12/31/10000") == None)
assert(validate[MDY3]("/1/1/1900") == None)
assert(validate[MDY3]("1/1/1900") == None)
assert(validate[MDY3]("2sdf.0") == None)
assert(validate[MDY3]("01/12/1902") == Some("01/12/1902"))
assert(validate[MDY3]("12/31/1902") == Some("12/31/1902"))
assert(validate[MDY3]("12/31/9999") == Some("12/31/9999"))
assert(validate[MDY3]("01/01/1900") == Some("01/01/1900"))
assert(validate[MDY3]("01//01/1900") == None)
assert(validate[MDY3]("01/01//1900") == None)