Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DateFilter<T>

A filter which work with dates

Type parameters

Hierarchy

  • DateFilter

Index

Constructors

constructor

Properties

Protected Readonly expr

expr: Record<string, unknown>

Protected Readonly filter

filter: Filter<Document<T>>

Protected Readonly path

path: string

Protected Readonly str

Accessors

date

hour

millisecond

minute

month

second

year

Methods

compare

  • compare(operator: "$eq" | "$ne", date: Date): Match<T>
  • Filter if the comparison return true

    Parameters

    • operator: "$eq" | "$ne"
    • date: Date

    Returns Match<T>

diff

equal

  • equal(date: Date): Match<T>

expression

  • expression(expr: "$millisecond" | "$second" | "$minute" | "$hour" | "$dayOfMonth" | "$month" | "$year"): NumFilter<T>
  • Date expression filter

    Parameters

    • expr: "$millisecond" | "$second" | "$minute" | "$hour" | "$dayOfMonth" | "$month" | "$year"

    Returns NumFilter<T>

notEqual

  • notEqual(date: Date): Match<T>

Generated using TypeDoc