stardew-tracker/static/calendar.js

11 lines
430 B
JavaScript

(function exposeCalendar(root, factory) {
const api = factory();
if (typeof module === "object" && module.exports) module.exports = api;
if (root) root.ValleyCalendar = api;
})(typeof window === "undefined" ? globalThis : window, () => ({
birthdayOn(birthdays, season, day, year) {
const entry = birthdays?.[season]?.[day];
if (!entry || (entry[1] && entry[1] !== year)) return null;
return entry[0];
}
}));