Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DateDiff

Index

Properties

Properties

$dateDiff: { startDate: DateExpression; endDate: DateExpression; unit: StringExpression<DateUnit>; timezone?: tzExpression; startOfWeek?: StringExpression<StartOfWeek> }

Type declaration

  • startDate: DateExpression

    The start of the time period. The startDate can be any expression that resolves to a Date, a Timestamp, or an ObjectID.

  • endDate: DateExpression

    The end of the time period. The endDate can be any expression that resolves to a Date, a Timestamp, or an ObjectID.

  • unit: StringExpression<DateUnit>

    The time measurement unit between the startDate and endDate. It is an expression that resolves to a string:

    • year
    • quarter
    • week
    • month
    • day
    • hour
    • minute
    • second
    • millisecond
  • Optional timezone?: tzExpression

    The timezone to carry out the operation. must be a valid expression that resolves to a string formatted as either an Olson Timezone Identifier or a UTC Offset. If no timezone is provided, the result is displayed in UTC.

  • Optional startOfWeek?: StringExpression<StartOfWeek>

    Used when the unit is equal to week. Defaults to Sunday. The startOfWeek parameter is an expression that resolves to a case insensitive string:

    • monday (or mon)
    • tuesday (or tue)
    • wednesday (or wed)
    • thursday (or thu)
    • friday (or fri)
    • saturday (or sat)
    • sunday (or sun)

Generated using TypeDoc