Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #36 from 18F/holiday-alts-take-2
Browse files Browse the repository at this point in the history
Holiday alternate names, take 2
  • Loading branch information
mgwalker authored Sep 17, 2021
2 parents 5bf1c4b + b93a463 commit 91eecc0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ const allFederalHolidaysForYear = (

return {
name: holiday.name,
alsoObservedAs: holiday.alsoObservedAs,
date: date.toDate(),
dateString: date.format("YYYY-MM-DD")
};
Expand Down
8 changes: 8 additions & 0 deletions index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ tap.test("handles standard federal holidays", async tests => {
federalHolidays.isAHoliday(getDate(holiday.dateString)),
`${holiday.dateString} is a holiday (observed)`
);

// Make sure the alsoObservedAs property gets pulled through
if (
holiday.name === "Washington's Birthday" ||
holiday.name === "Columbus Day"
) {
test.ok(holiday.alsoObservedAs);
}
});
}
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@18f/us-federal-holidays",
"version": "2.1.0",
"version": "2.1.1",
"description": "All about US federal holidays",
"main": "index.js",
"keywords": [
Expand Down

0 comments on commit 91eecc0

Please sign in to comment.