Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Não deve aceitar meses consecutivos dentro do mesmo ano
- #
- valid = ["01/2012", "04/2012", "07/2012", "10/2012"]
- invalid = ["01/2012", "04/2012", "07/2012", "08/2012"]
- valid_2 = ["01/2012", "04/2012", "02/2013", "05/2013"]
- invalid_2 = ["02/2012", "01/2012"]
- valid_months?(valid)
- => true
- valid_months?(invalid)
- => false
- valid_months?(valid_2)
- => true
- valid_months?(invalid_2)
- => false
Add Comment
Please, Sign In to add comment