Skip to content

deprecation(datetime): deprecate @std/datetime in favor of Temporal - #7263

Open
tomas-zijdemans wants to merge 1 commit into
denoland:mainfrom
tomas-zijdemans:deprecation-datetime
Open

deprecation(datetime): deprecate @std/datetime in favor of Temporal#7263
tomas-zijdemans wants to merge 1 commit into
denoland:mainfrom
tomas-zijdemans:deprecation-datetime

Conversation

@tomas-zijdemans

@tomas-zijdemans tomas-zijdemans commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Step 2 of #7262 (scope per the issue: the whole package, including format and parse).

Every export now carries a @deprecated tag naming its Temporal replacement, plus a runnable before/after "Migration to Temporal" example so the migration path shows up in the JSR docs and in editors:

Deprecated Replacement
dayOfYear / dayOfYearUtc Temporal.PlainDate/ZonedDateTime .dayOfYear
isLeap / isUtcLeap .inLeapYear
weekOfYear Temporal.PlainDate.prototype.weekOfYear
difference (+ Unit, DifferenceFormat, DifferenceOptions) Temporal.PlainDate.prototype.until / since
SECONDWEEK Temporal.Duration
JANUARYDECEMBER 1-based month numbers
SUNDAYSATURDAY dayOfWeek (ISO 8601: Monday = 1, Sunday = 7)
format (+ FormatOptions) Intl.DateTimeFormat / Temporal toString() / toLocaleString()
parse Temporal.PlainDateTime.from etc. for ISO 8601 input

All migration snippets are exercised by the doc tests (deno test --doc datetime/) and are timezone-independent. Tag style follows the @std/io deprecation: no pinned removal version, since the grace period is settled in step 5 of the issue.

The module-doc deprecation notice is step 3 and will follow as a separate PR.

I used Claude Code to help investigate and write this change.

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.03%. Comparing base (df4d14d) to head (153eadb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7263      +/-   ##
==========================================
- Coverage   95.03%   95.03%   -0.01%     
==========================================
  Files         619      618       -1     
  Lines       51499    51496       -3     
  Branches     9301     9300       -1     
==========================================
- Hits        48940    48937       -3     
  Misses       2021     2021              
  Partials      538      538              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Adds @deprecated tags to every export, each naming its Temporal
replacement, plus a before/after migration example per symbol.
Step 2 of denoland#7262.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant