Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "time/quarter-of-year/docs/types/index.d"

Index

Functions

Functions

Export assignment quarterOfYear

  • quarterOfYear(month?: string | number | Date): number
  • Returns the quarter of the year.

    Notes

    • By default, the function returns the quarter of the year for the current month in the current year (according to local time). To determine the quarter for a particular month, provide either a month or a Date object.
    • A month may be either a month's integer value, three letter abbreviation, or full name (case insensitive).
    throws

    must provide a recognized month

    throws

    an integer month argument must be on the interval [1,12]

    Parameters

    • Optional month: string | number | Date

      month (or Date)

    Returns number

    quarter of the year

    Example

    var q = quarterOfYear( new Date() );
    // returns <number>

    Example

    var q = quarterOfYear( 4 );
    // returns 2

    Example

    var q = quarterOfYear( 'June' );
    // returns 2