Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DateAdd

Index

Properties

Properties

$dateAdd: { startDate: DateExpression; unit: StringExpression<DateUnit>; amount: NumberExpression; timezone?: tzExpression }

Type declaration

  • startDate: DateExpression

    The beginning date, in UTC, for the addition operation. The startDate can be any expression that resolves to a Date, a Timestamp, or an ObjectID.

  • unit: StringExpression<DateUnit>

    The unit used to measure the amount of time added to the startDate. The unit is an expression that resolves to one of the following strings:

    • year
    • quarter
    • week
    • month
    • day
    • hour
    • minute
    • second
    • millisecond
  • amount: NumberExpression

    The number of units added to the startDate. The amount is an expression that resolves to an integer or long. The amount can also resolve to an integral decimal or a double if that value can be converted to a long without loss of precision.

  • 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.

Generated using TypeDoc