Skip to content

Instantly share code, notes, and snippets.

@DeMarko
Created October 18, 2018 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeMarko/f2fd61967c91958020f38262d431ca2d to your computer and use it in GitHub Desktop.
Save DeMarko/f2fd61967c91958020f38262d431ca2d to your computer and use it in GitHub Desktop.
diff --git a/app_admin/client/lib/holidays.js b/app_admin/client/lib/holidays.js
index adae7bfcb..7b586e084 100644
--- a/app_admin/client/lib/holidays.js
+++ b/app_admin/client/lib/holidays.js
@@ -111,8 +111,10 @@ export const isMidweekHoliday = () => {
isHoliday = true;
}
/* adds 1 day padding to midweek holidays so day before holiday also
- triggers holiday delay messaging. */
- if (holiday.subtract(1, 'days').format('LLLL') === today.format('LLLL')) {
+ * triggers holiday delay messaging.
+ */
+ const dayBeforeHoliday = holiday.clone().subtract(1, 'days');
+ if (dayBeforeHoliday.format('LLLL') === today.format('LLLL')) {
isHoliday = true;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment