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