Skip to content
Giuseppe Cannella edited this page Feb 19, 2020 · 2 revisions
Type name example
MDY2 12-31-1902
import com.github.gekomad.regexcollection.MDY2
import com.github.gekomad.regexcollection.Validate.validate

assert(validate[MDY2]("1-12-1902") == Some("1-12-1902"))
assert(validate[MDY2]("12-31-1902") == Some("12-31-1902"))
assert(validate[MDY2]("12-31-9999") == Some("12-31-9999"))
assert(validate[MDY2]("12-31-19020") == None)
assert(validate[MDY2]("-1-1-1900") == None)
assert(validate[MDY2]("1-1-1900") == Some("1-1-1900"))
assert(validate[MDY2]("1--1-1900") == None)
assert(validate[MDY2]("1-1--1900") == None)
Clone this wiki locally