The DateFilter will check if a value is a date or not. Also when sanitizing the value is converted to a date form.

Extends AbstractFilter
Defined in: lib/filter/date.js:5

Methods

sanitize (value)

Inherited from AbstractFilter but overwritten in lib/filter/date.js:24

The sanitize method will sanitize the value to a date object.

Parameters

Name Type Description
value * The value to sanitize.

Returned Value

Date: The sanitized date object.


validate (value)

Inherited from AbstractFilter but overwritten in lib/filter/date.js:13

This method will check if the value is a date object.

Parameters

Name Type Description
value * The value to check.

Returned Value

Boolean: True when a value is a date object otherwise false.