Skip to content

refactor(datetime): Split DateTimeFormatter functions out #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 2 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 94.72656% with 27 lines in your changes missing coverage. Please review.

Project coverage is 95.31%. Comparing base (b5a5fe4) to head (471a374).

Files with missing lines Patch % Lines
datetime/_date_time_formatter.ts 94.72% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6566      +/-   ##
==========================================
+ Coverage   95.21%   95.31%   +0.09%     
==========================================
  Files         577      577              
  Lines       43381    43419      +38     
  Branches     6487     6505      +18     
==========================================
+ Hits        41307    41385      +78     
+ Misses       2034     1994      -40     
  Partials       40       40              

☔ 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.

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