mirror of
https://github.com/bendtherules/is-nifty-open.git
synced 2026-08-19 00:32:31 +00:00
Add next open/close day panel + refactor common funcs to util
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@ export function isWeekend(date: moment.Moment): boolean {
|
||||
}
|
||||
}
|
||||
|
||||
export function getWeekendHoliday(date: moment.Moment): Holiday | undefined {
|
||||
export function getWeekendHolidayOnDate(date: moment.Moment): Holiday | undefined {
|
||||
if (isWeekend(date)) {
|
||||
const dateWeekDay = date.isoWeekday();
|
||||
return { "Description": "Weekend", "Date": date, "Day": ISOWeekDay[dateWeekDay] };
|
||||
|
||||
Reference in New Issue
Block a user