@technobuddha/library
Version: 
A large library of useful functions
22 lines (21 loc) • 567 B
TypeScript
/**
 * Options for the {@link getBeginningOfYear} function
 *
 * @group Time
 * @category Year
 */
export type BeginningOfYearOptions = {
    /** Use the utc timezone */
    utc?: boolean;
};
/**
 * Determine the start of the year for a date
 *
 * @param input - The date
 * @param options - see {@link BeginningOfYearOptions}
 * @defaultValue utc false
 * @returns The date value for midnight on the first day of the specified year
 * @group Time
 * @category Year
 */
export declare function getBeginningOfYear(input: Date, { utc }?: BeginningOfYearOptions): Date;