Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.07 KB

README.md

File metadata and controls

35 lines (25 loc) · 1.07 KB

"Go Orange" detection

Determines if a date falls within National Work Zone Awareness Week (NWZAW).

Node.js CI npm npm

Usage

Installation

npm install @wsdot/go-orange

Use

import {
  isWorkZoneAwarenessMonth,
  isWorkZoneAwarenessWeek,
} from "@wsdot/go-orange";

const today = new Date();
const isGoOrangeMonth = isWorkZoneAwarenessMonth(today);
const isNWZAWeek = isWorkZoneAwarenessWeek(today);

if (isGoOrangeMonth) {
  // Import the specific Go Orange CSS or whatever customizations you need to do.
  if (isNWZAWeek) {
    alert("It's National Work Zone Awareness Week!");
  }
}