@@ -32,7 +32,9 @@ The following set of extra asserts are provided by this package:
3232- [ CreditCard] ( #creditcard ) (requires ` creditcard ` )
3333- [ Date] ( #date ) (requires ` moment ` for format validation only)
3434- [ DateDiffGreaterThan] ( #datediffgreaterthan ) (requires ` moment ` )
35+ - [ DateDiffGreaterThanOrEqualTo] ( #datediffgreaterthanorequalto ) (requires ` moment ` )
3536- [ DateDiffLessThan] ( #datedifflessthan ) (requires ` moment ` )
37+ - [ DateDiffLessThanOrEqualTo] ( #datedifflessthanorequalto ) (requires ` moment ` )
3638- [ Email] ( #email ) (requires ` validator ` )
3739- [ EqualKeys] ( #equalkeys )
3840- [ Hash] ( #hash )
@@ -107,6 +109,17 @@ Tests if the value is a valid date.
107109### DateDiffGreaterThan
108110Tests if the difference between two dates is greater than a given threshold.
109111
112+ #### Arguments
113+ - ` threshold ` (required)
114+ - ` options `
115+ - ` absolute ` - whether the comparison should use the absolute value of the measured difference.
116+ - ` asFloat ` - whether to return the difference rounded down or as float.
117+ - ` fromDate ` - the date where the diff is measured with. If omitted, defaults to ` now ` .
118+ - ` unit ` - the unit of the difference measurement (` years ` , ` months ` , ` weeks ` , ` days ` , ` hours ` , ` minutes ` and ` seconds ` ).
119+
120+ ### DateDiffGreaterThanOrEqualTo
121+ Tests if the difference between two dates is greater than or equal to a given threshold.
122+
110123#### Arguments
111124- ` threshold ` (required)
112125- ` options `
@@ -118,6 +131,17 @@ Tests if the difference between two dates is greater than a given threshold.
118131### DateDiffLessThan
119132Tests if the difference between two dates is less than a given threshold.
120133
134+ #### Arguments
135+ - ` threshold ` (required)
136+ - ` options `
137+ - ` absolute ` - whether the comparison should use the absolute value of the measured difference.
138+ - ` asFloat ` - whether to return the difference rounded down or as float.
139+ - ` fromDate ` - the date where the diff is measured with. If omitted, defaults to ` now ` .
140+ - ` unit ` - the unit of the difference measurement (` years ` , ` months ` , ` weeks ` , ` days ` , ` hours ` , ` minutes ` and ` seconds ` ).
141+
142+ ### DateDiffLessThanOrEqualTo
143+ Tests if the difference between two dates is less than or equal to a given threshold.
144+
121145#### Arguments
122146- ` threshold ` (required)
123147- ` options `
0 commit comments