Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment dayOfQuarter

  • dayOfQuarter(month?: string | number | Date, day?: undefined | number, year?: undefined | number): number
  • Returns the day of the quarter.

    Notes

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

    must provide a recognized month

    throws

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

    throws

    second argument must be greater than 0 and less than or equal to the maximum number of days in a month

    Parameters

    • Optional month: string | number | Date

      month (or Date)

    • Optional day: undefined | number

      day

    • Optional year: undefined | number

      year

    Returns number

    day of the quarter

    Example

    var day = dayOfQuarter();
    // returns <number>
    
    day = dayOfQuarter( new Date() );
    // returns <number>
    
    day = dayOfQuarter( 12, 31, 2017 );
    // returns 92