UNPKG

swedish-salary-day

Version:

Calculate the next or previous salary payout date according to configured rules.

9 lines (8 loc) 401 B
export interface Config { dayOfMonth: number; isHoliday?: (date: Date) => boolean; resolveSaturday?: 'previous-work-day' | 'next-work-day'; resolveSunday?: 'previous-work-day' | 'next-work-day'; } export declare function nextSalaryDay(referenceDate: Date | number, config?: Config): Date; export declare function previousSalaryDay(referenceDate: Date | number, config?: Config): Date;