Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Moment

Hierarchy

  • Moment

Index

Methods

dateOnly

  • dateOnly(): Moment
  • The dateOnly() method can be used to remove any time information from a moment.

    moment("2014-01-01 09:30:26").dateOnly(); // 01/01/2014 12:00:00 AM
    

    Returns Moment

monthWeek

  • monthWeek(): number
  • monthWeek(week: number): Moment
  • The monthWeek() method can be used to determine the week of the month a date is in.

    moment("01/01/2014").monthWeek(); // 0
    

    Returns number

  • Parameters

    • week: number

    Returns Moment

monthWeekByDay

  • monthWeekByDay(): number
  • monthWeekByDay(dayCount: number): Moment
  • Plugin for calculating the occurrence of the day of the week in the month. Similar to moment().monthWeek(), the return value is zero-indexed. A return value of 2 means the date is the 3rd occurence of that day of the week in the month.

    Returns number

  • Parameters

    • dayCount: number

    Returns Moment

recur

  • recur(start?: moment.MomentInput, end?: moment.MomentInput): Recur
  • recur(options?: Options): Recur
  • Recur can also be created the following ways:

    moment().recur()
    moment().recur(options)
    moment().recur(start, end)
    moment(start).recur(end)
    moment().recur(end)
    

    Parameters

    • Optional start: moment.MomentInput
    • Optional end: moment.MomentInput

    Returns Recur

  • Parameters

    Returns Recur

Generated using TypeDoc