1// .my-super-countdown is an example 2// you can target any HTML element with any CSS selector 3simplyCountdown(".simply-countdown", { 4 // Target date (Required) 5 year: 2026, // Target year [YYYY] 6 month: 10, // Target month [1-12] 7 day: 03, // Target day [1-31] 8 hours: 18, // Target hours [0-23] 9 minutes: 0, // Target minutes [0-59] 10 seconds: 0, // Target seconds [0-59] 11 12 // Words customization 13 words: { 14 days: { 15 // Function to handle pluralization 16 lambda: (root, count) => (count > 1 ? root + "s" : root), 17 root: "day", // Base word for days 18 }, 19 hours: { 20 lambda: (root, count) => (count > 1 ? root + "s" : root), 21 root: "hour", 22 }, 23 minutes: { 24 lambda: (root, count) => (count > 1 ? root + "s" : root), 25 root: "minute", 26 }, 27 seconds: { 28 lambda: (root, count) => (count > 1 ? root + "s" : root), 29 root: "second", 30 }, 31 }, 32 33 // Display options 34 plural: true, // Enable/disable pluralization 35 inline: false, // Display inline (true) or in blocks (false) 36 inlineSeparator: ", ", // Separator for inline display 37 enableUtc: false, // Use UTC time instead of local time 38 39 // Styling classes 40 inlineClass: "simply-countdown-inline", // Class for inline display 41 sectionClass: "simply-section", // Class for each time unit section 42 amountClass: "simply-amount", // Class for number display 43 wordClass: "simply-word", // Class for word display 44 45 // Formatting options 46 zeroPad: false, // Add leading zeros to numbers (e.g., 05 instead of 5) 47 countUp: false, // Count up from target date instead of down to it 48 removeZeroUnits: false, // Hide time units when they reach zero 49 refresh: 1000, // Update interval in milliseconds (1 second = 1000) 50 51 // Event handlers 52 onEnd: () => { 53 // Callback function when countdown ends 54 console.log("Countdown finished!"); 55 }, 56 onStop: () => {}, // Callback when countdown is stopped 57 onResume: () => {}, // Callback when countdown is resumed 58 onUpdate: (params) => {}, // Callback when countdown is updated 59});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.