From f54c7f40bbec7406b764afbaf569721fc7763944 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 29 Apr 2022 14:26:54 -0600 Subject: [PATCH] Improve holidays() return documentation --- api/js/etemplate/Et2Date/Holidays.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/js/etemplate/Et2Date/Holidays.ts b/api/js/etemplate/Et2Date/Holidays.ts index 935ef4da83..202c269725 100644 --- a/api/js/etemplate/Et2Date/Holidays.ts +++ b/api/js/etemplate/Et2Date/Holidays.ts @@ -8,15 +8,15 @@ let _holiday_cache = {}; * Get a list of holidays for the given year * * Returns either a list of holidays indexed by date, in Ymd format: - * {20001225: {day: 14, month: 2, occurence: 2021, name: "Valentinstag"}} + * {20001225: [{day: 14, month: 2, occurence: 2021, name: "Valentinstag"}]} * or a promise that resolves with the list. * * No need to cache the results, we do it here. * * @param year - * @returns Promise | Object + * @returns Promise<{[key: string]: Array}>|{[key: string]: Array} */ -export function holidays(year) : Promise | {} +export function holidays(year) : Promise<{ [key : string] : Array }> | { [key : string] : Array } { // No country selected causes error, so skip if it's missing if(!egw.preference('country', 'common'))