@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
15 lines (14 loc) • 478 B
TypeScript
/**
* Return the number of days in the calendar year containing `value`.
*
* - 365 for a common year, 366 for a leap year.
* - Returns null on invalid input.
*
* @param value ISO PlainDate string
* @returns 365 or 366, or null on invalid input
*
* @example getDaysInYear("2024-06-15") // 366 (leap year)
* @example getDaysInYear("2023-06-15") // 365
* @example getDaysInYear("invalid") // null
*/
export declare function getDaysInYear(value: string): number | null;