Skip to content

refactor(datetime): Move behavior of DateTimeFormatter to standalone functions #6566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

WWRS
Copy link
Contributor

@WWRS WWRS commented Apr 10, 2025

Improves test coverage.

The functions are almost entirely unchanged, with the exception of some renaming.

These functions should not be used outside tests, and DateTimeFormatter itself is an internal class.

TODO (I will look into these):

  • Refactor errors to consistently provide useful feedback
  • Add support for more format strings: Goal is parity with Intl.DateTimeFormat
  • Add support for time zones (this will improve coverage in this file to almost 100%)

@WWRS WWRS requested a review from kt3k as a code owner April 10, 2025 15:59
Copy link

codecov bot commented Apr 10, 2025

Codecov Report

Attention: Patch coverage is 95.11719% with 25 lines in your changes missing coverage. Please review.

Project coverage is 94.84%. Comparing base (c338b2f) to head (cbc909a).

Files with missing lines Patch % Lines
datetime/_date_time_formatter.ts 95.11% 25 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6566      +/-   ##
==========================================
+ Coverage   94.75%   94.84%   +0.09%     
==========================================
  Files         584      584              
  Lines       46563    46601      +38     
  Branches     6541     6559      +18     
==========================================
+ Hits        44120    44199      +79     
+ Misses       2400     2358      -42     
- Partials       43       44       +1     

☔ View full report in Codecov by Sentry.
📢 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.

@WWRS WWRS changed the title refactor(datetime): Split DateTimeFormatter functions out refactor(datetime): Move behavior of DateTimeFormatter to standalone functions May 7, 2025
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