The Short Answer
Cloudflare Workers can now do time-zone conversions and calendar-correct date arithmetic natively, without a date library in your bundle. In a December 1, 2026 changelog entry, Cloudflare announced Workers support for the Temporal API, the modern JavaScript standard for dates and times. Temporal is on for compatibility dates of 2026-12-01 or later; earlier Workers opt in with the temporal flag, and new-date Workers can opt out with no_temporal. Cloudflare’s example converts a meeting into the visitor’s zone via request.cf?.timezone and Temporal.ZonedDateTime — no Moment.js, Luxon, or date-fns needed.
For server-side JavaScript, this is bigger than convenience. Date handling is where scheduling, billing, and “show this in the user’s local time” features quietly break — across daylight saving changes, month ends, and leap years. Temporal separates what Date mixes together: an exact instant, a date-time in a time zone, and a plain calendar date with no zone at all. Cloudflare published no bundle-size or performance benchmarks, so treat third-party speedup numbers with caution; the verified win is capability. Below: what shipped, how to turn it on safely, and what to test before deleting a library.
What Cloudflare Announced on December 1
The announcement is a Cloudflare changelog entry, “The Temporal API is now available in Workers,” dated December 1, 2026, checked on Cloudflare’s developer site on December 5, 2026. The entry is short and specific:
- Workers now support the Temporal API for converting between time zones, doing calendar-correct date arithmetic, and working with plain dates and times, without bundling a date library such as Moment.js, Luxon, or date-fns.
- Temporal is enabled for Workers with a compatibility date of
2026-12-01or later. - Workers with an earlier compatibility date add the
temporalcompatibility flag in Wrangler configuration (JSON or TOML forms are both shown). - The worked example reads the visitor’s detected time zone, parses a zoned date-time string, converts it with
withTimeZone(), and returns the local plain time and plain date. - For the full API surface, Cloudflare points readers to the Temporal documentation on MDN.
The compatibility-flags reference, also checked December 5, 2026, lists the change as “Enable the Temporal API” (Default as of 2026-12-01; enable temporal, disable no_temporal). It adds the capability list — time-zone conversion with daylight saving handled, plain dates and times such as a birthday or opening hour, calendar-correct durations like “1 month and 3 days,” and locale-aware compare, sort, and format — plus two notes: Temporal objects are immutable, and Temporal.Now returns the same time as Date.now().
That is the entire claim set: no pricing line item, region list, or performance table. Temporal is a runtime capability gated by the compatibility mechanism — which is why the enablement steps matter more than the headline.
Why Date on a Server Is Harder Than It Looks
MDN’s Temporal overview, checked December 5, 2026, states the root problem plainly: Date was modeled on an old Java class that Java itself replaced, kept in JavaScript for backward compatibility. One object is two things at once — a timestamp and a bundle of calendar components that only map to a real instant once a time zone is attached.
Three consequences bite server code:
- Time zones are nearly absent. Component access happens in UTC or the runtime’s local zone; there is no arbitrary zone such as
America/New_York, and no “no zone” concept for a plain calendar date. On a UTC server, “show 09:30 local” becomes manual offset arithmetic — where daylight saving bugs hide. - Mutation creates side effects. Setters mutate in place, so a helper can silently change its caller’s date — hard to spot when handlers share objects across logging, caching, and formatting.
- Parsing and calendars are narrow. The string format cannot be parsed consistently, and only the Gregorian calendar is modeled. Libraries filled these gaps, which is why Moment.js, Luxon, and date-fns became default bundle passengers.
Temporal splits the jobs across small, immutable types instead. That split is the real news; Cloudflare is the latest runtime to ship it natively.
What Temporal Gives You in a Worker
Temporal is a namespace of classes, each handling one level of abstraction:
Temporal.Instant— a unique point in history as a timestamp, for storage and comparison.Temporal.ZonedDateTime— a date-time paired with a time zone, withwithTimeZone()and calendar arithmetic viaadd()andsubtract().Temporal.PlainDateTime,PlainDate, andPlainTime— zone-free values (a birthday, an opening hour, a billing date) that no hidden conversion can move.Temporal.PlainYearMonthandPlainMonthDay— partial dates for recurring monthly or annual logic.Temporal.Duration— a difference between two points, so “1 month and 3 days” is a first-class value.Temporal.Now— current-time accessors in the formats above.
Two properties run through all of them: immutability (operations return new objects, removing shared-mutation bugs) and calendar awareness (adding a month means the next calendar month, not “30 days later”). Cloudflare’s flags page demonstrates both with a December 15, 2026 New York meeting converted to London time, then advanced one month to January 15, 2027.
| Date + bundled library | Temporal in Workers | |
|---|---|---|
| Time-zone conversion | Library code in your bundle; arbitrary zones depend on the library | Native ZonedDateTime.withTimeZone(); DST handled by the runtime |
| Plain dates (no zone) | No native concept; convention only | PlainDate / PlainTime types built in |
| Mutation | Date setters mutate in place |
Immutable; every operation returns a new value |
| Calendar arithmetic | Library-dependent; month-end edges vary | Calendar-correct add() / subtract() with durations |
| Enablement | Install and bundle the library | Compatibility date 2026-12-01+ or temporal flag |
| Verdict | Still fine where already tested | The native default for new Workers date code |
Date does not disappear — Temporal.Now aligns with Date.now(), and existing code keeps working. New code simply no longer needs a library to answer “what time is this in the visitor’s zone?” correctly.
How to Turn It On (and How to Keep It Off)
Compatibility dates are opt-in: bumping the date enables every flag defaulted on or before it, not just Temporal. Choose the narrowest switch that fits.
New Workers, or Workers already moving to a current date: set the compatibility date to 2026-12-01 or later and Temporal is on with no extra configuration:
{
"compatibility_date": "2026-12-01"
}
Existing Workers pinned to an earlier date: add only the Temporal flag, leaving every other behavior untouched. In JSON configuration:
{
"compatibility_flags": [
"temporal"
]
}
The TOML form is compatibility_flags = ["temporal"]. Flags can also be set in the dashboard or via the Workers APIs.
Workers on the new date that must keep Temporal off: add no_temporal. Use it when a Worker feature-detects Temporal and is not yet tested natively — a deliberate delay beats an untested automatic switch.
Deploy it like any runtime change: test in preview first, exercise DST-boundary and month-end cases, and watch error rates after promotion. Our report on Cloudflare Workflows, Pages and Workers Builds failing in Western North America is a reminder that mature platform surfaces still have bad days; a date bump is a platform change, not a comment edit.
Should You Delete Moment, Luxon, or date-fns?
Not on announcement day. Cloudflare says Temporal replaces many uses of Date and date libraries — the flags page’s exact word is “many” — for the covered jobs. It claims no feature-for-feature parity and publishes no bundle or speed measurements. Articles quoting precise cold-start wins are quoting their own tests, not Cloudflare’s.
A sane order:
- Inventory first. Find every user-facing time format, wall-clock schedule, and calendar addition. Pure timestamp storage can stay as-is.
- Convert visitor-local rendering first. The
request.cf?.timezoneplusZonedDateTimepattern replaces the most common library use with the least churn. - Replace calendar arithmetic next. “Add one month” and “end of month” are where hand-rolled math fails;
PlainDateandDurationmake them explicit. - Keep the library until its last use is gone. Legacy parsing and locale edges may justify it for a while. Deleting the import is the final step.
- Test the boundaries. DST transitions, February 29, January 31 plus one month, and non-hour-offset zones. If those pass natively, the library’s remaining value is small.
Temporal removes the reason for the library; your codebase must still prove it.
What This Means If You Run JavaScript on a VPS Instead
Temporal is a JavaScript standard, not a Cloudflare invention. For readers running Node or Deno on a VPS or homelab box:
- Do not assume your runtime matches Workers. Whether
Temporalexists in your Node or Deno version — and whether it sits behind a flag — depends on that runtime. Check before porting code either way; a missing global fails at the first date operation, not at deploy time. - Self-hosted workerd is now a variable. The experimental clustering release in Cloudflare workerd Can Now Cluster on Your Own Servers runs the Workers model on your own machines. Which features your build enables, flags included, becomes a question you own.
- The Deno migration raises the stakes. With the Deno team at Cloudflare and Deno Deploy shutting down in April 2027 (Deno Joins Cloudflare and Deno Deploy Shuts Down in April 2027), more teams will move date-heavy code between runtimes soon. Temporal’s explicit types travel better than library-specific APIs.
Workers developers flip a date or flag today; VPS developers should audit their runtime now and plan the same migration.
Risks and Open Questions
Three cautions. First, a date bump opts into every change defaulted on or before that date — prefer the single temporal flag for a surgical change. Second, unconditional Temporal references fail wherever the flag is off; feature-detect during transition. Third, the announcement covers no pricing, limits, or performance. Any dollar or millisecond figures elsewhere are the author’s; re-measure on your workload before acting on them.
FAQ
When did Cloudflare Workers get the Temporal API?
Cloudflare’s changelog entry “The Temporal API is now available in Workers” is dated December 1, 2026. Temporal is enabled by default for Workers with a compatibility date of 2026-12-01 or later, per both the changelog and the compatibility-flags reference.
How do I enable Temporal on an older Worker?
Add the temporal compatibility flag in your Wrangler configuration — "compatibility_flags": ["temporal"] in JSON, or compatibility_flags = ["temporal"] in TOML. Flags can also be set in the Cloudflare dashboard or via the Workers APIs.
How do I turn Temporal off on the new compatibility date?
Add no_temporal to compatibility_flags. Cloudflare lists no_temporal as the disable flag for the December 1, 2026 change.
Does Temporal replace Moment.js, Luxon, and date-fns completely?
Cloudflare says Workers can now convert time zones and do calendar-correct arithmetic without bundling those libraries, and that Temporal replaces many uses of Date and date libraries. That is not a claim of total parity — migrate use by use, keep the library until its last job is covered, and test DST and month-end boundaries before deleting anything.
What is the difference between ZonedDateTime and PlainDate?
ZonedDateTime is a date-time tied to a specific time zone — the right type for meetings and visitor-local rendering. PlainDate (with PlainTime and PlainDateTime) carries no zone at all — the right type for birthdays, opening hours, and billing dates that must never shift with a zone conversion. MDN’s Temporal overview defines the full type split.
Does Temporal change how the current time works?
No. Cloudflare notes that Temporal.Now returns the same time as Date.now(). Existing Date code keeps working; Temporal adds explicit types for the cases Date handled poorly.
The Bottom Line
December 1, 2026 is when Workers date handling grew up. With the 2026-12-01 date or the temporal flag, a Worker converts instants into any visitor’s zone with DST handled, adds calendar months correctly, and keeps plain dates plain — natively and immutably, without bundling a library for those jobs. Take the narrow path: enable surgically, convert visitor-local rendering and calendar arithmetic first, prove the DST and month-end boundaries, then remove the library. On a VPS, check your runtime’s support before a migration forces the question. Time zones were hard because the old API hid the distinctions that matter; Temporal makes them explicit, and now they run on Workers by default.
Sources: Cloudflare, “The Temporal API is now available in Workers,” Cloudflare Changelog, December 1, 2026 — https://developers.cloudflare.com/changelog/post/2026-12-01-temporal-api/ (checked December 5, 2026) — Temporal availability, compatibility date 2026-12-01, temporal flag configuration in JSON and TOML, and the request.cf?.timezone plus Temporal.ZonedDateTime example. Cloudflare, “Compatibility flags,” Cloudflare Workers documentation — https://developers.cloudflare.com/workers/configuration/compatibility-flags (checked December 5, 2026) — “Enable the Temporal API” entry (Default as of 2026-12-01, enable temporal, disable no_temporal), capability list, immutability, and Temporal.Now alignment with Date.now(). MDN Web Docs, “Temporal” JavaScript reference — https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal (checked December 5, 2026) — Date design limitations (dual timestamp/component model, UTC/local-only zones, mutating setters, Gregorian-only calendars) and the Temporal type taxonomy (Instant, ZonedDateTime, PlainDateTime, PlainDate, PlainTime, PlainYearMonth, PlainMonthDay, Duration, Now). Featured image: four wall clocks showing different time zones for London, New York, Tokyo, and Moscow via Pexels (Pexels License, photo 48770, by Pixabay).



Leave a Reply