Skip to content

Commit

Permalink
removed custom1 & custom2 formats
Browse files Browse the repository at this point in the history
  • Loading branch information
drkameleon committed Nov 6, 2024
1 parent 230c65c commit d75809c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/validators/date.art
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ define :dateValidator is :validator [
iso8601: "yyyy-MM-dd'T'HH:mm:ss'Z'"
short: "MM/dd/yy"
long: "MMMM dd, yyyy"
custom1: "dd-MM-yyyy"
custom2: "dd.MM.yyyy"
]

;------------------
Expand Down Expand Up @@ -69,10 +67,6 @@ define :dateValidator is :validator [
; with different formats
["01/31/24" [format: 'short]]
["January 31, 2024" [format: 'long]]
["31-01-2024" [format: 'custom1]]
["31.01.2024" [format: 'custom2]]

; ISO8601
["2024-01-31T13:45:30Z" [format: 'iso8601]]

; custom formats
Expand Down Expand Up @@ -104,10 +98,6 @@ define :dateValidator is :validator [
; invalid dates with formats
["13/31/24" [format: 'short]] ; invalid month
["February 29, 2023" [format: 'long]] ; not a leap year
["32-01-2024" [format: 'custom1]] ; invalid day
["29.02.2100" [format: 'custom2]] ; not a leap year

; malformed ISO8601
["2024-01-31T25:45:30Z" [format: 'iso8601]] ; invalid hour
["2024-01-31T13:66:4Z" [format: 'iso8601]] ; invalid minute
["2024-01-31 13:45:30Z" [format: 'iso8601]] ; wrong separator
Expand Down

0 comments on commit d75809c

Please sign in to comment.