UNPKG

701 BTypeScriptView Raw
1import type { ContextOptions, DateArg } from "./types.js";
2/**
3 * The {@link getDayOfYear} function options.
4 */
5export interface GetDayOfYearOptions extends ContextOptions<Date> {}
6/**
7 * @name getDayOfYear
8 * @category Day Helpers
9 * @summary Get the day of the year of the given date.
10 *
11 * @description
12 * Get the day of the year of the given date.
13 *
14 * @param date - The given date
15 * @param options - The options
16 *
17 * @returns The day of year
18 *
19 * @example
20 * // Which day of the year is 2 July 2014?
21 * const result = getDayOfYear(new Date(2014, 6, 2))
22 * //=> 183
23 */
24export declare function getDayOfYear(
25 date: DateArg<Date> & {},
26 options?: GetDayOfYearOptions | undefined,
27): number;