Week Start Key
weekStartKey(date, tz) returns the Monday of that date's week as yyyy-MM-dd, computed in the given timezone. Use it as a stable grouping key…
Week Start Key
weekStartKey(date, tz) returns the Monday of that date's week as yyyy-MM-dd, computed in the given timezone. Use it as a stable grouping key…
Stamp “last successful run” where ops can actually see it
“Did the sync run last night?” is a question that shouldn’t need you. But if the only answer lives in the Apps Script Executions page, every…
Filter Objects By Date Window
“Rows from the last 7 days” sounds trivial until a row stamped at 11:30pm in New York shows up as tomorrow because something compared…
Is Within Business Hours
A time-driven trigger that fires at 3am and emails a client is a support ticket waiting to happen. isWithinBusinessHours(startHHmm, endHHmm…
Stamp Last Successful Run
“Did the nightly job run?” shouldn’t mean opening Executions. stampLastSuccessfulRun(target, status, opts) writes a spreadsheet-timezone…
Format in Spreadsheet Timezone
Log stamps and export filenames that disagree with the sheet’s timezone are a classic bootstrapper footgun. formatInSpreadsheetTimezone(date…