MCPcopy Create free account
hub / github.com/BrasilAPI/BrasilAPI / getHolidays

Function getHolidays

tests/helpers/feriados/index.js:147–163  ·  view source on GitHub ↗
(
  year,
  holidaysName = [...easterHolidaysName, ...fixedHolidaysName]
)

Source from the content-addressed store, hash-verified

145};
146
147const getHolidays = (
148 year,
149 holidaysName = [...easterHolidaysName, ...fixedHolidaysName]
150) => {
151 return [
152 ...getEasterHolidays(year, holidaysName),
153 ...getFixedHolidays(year, holidaysName),
154 ].sort((a, b) => {
155 if (a.date > b.date) {
156 return 1;
157 }
158 if (a.date < b.date) {
159 return -1;
160 }
161 return 0;
162 });
163};
164
165module.exports = {
166 getEasterHolidays,

Callers 1

Calls 2

getFixedHolidaysFunction · 0.85
getEasterHolidaysFunction · 0.70

Tested by

no test coverage detected