Skip to content

Conversation

@balajis-qb
Copy link
Contributor

@balajis-qb balajis-qb commented Jan 8, 2026

Description

Linked issue: #6217

Problem
This PR renames a date utility function and update its documentation to correctly reflect it's day-of-month behaviour when using the ddd format. The previous name getDayOfWeekCode implies it would return week codes like 'sun', 'mon', etc. However, it actually returns the day of the month as a zero-padded 3-digit string (e.g. "001", "002", "003", etc).

Changes

  • Renamed getDayOfWeekCode to getDayOfMonthCode
  • Removed the unused locale argument
  • Updated the documentation to correctly reflect the new function's behaviour
  • Updated the code to use the new function
  • Updated the tests to reflect the new function's behaviour
  • No functional changes

Contribution checklist

  • I have followed the contributing guidelines.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.29%. Comparing base (548a1f3) to head (56574ba).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6218   +/-   ##
=======================================
  Coverage   99.29%   99.29%           
=======================================
  Files          30       30           
  Lines        3822     3822           
  Branches     1648     1665   +17     
=======================================
  Hits         3795     3795           
  Misses         26       26           
  Partials        1        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.

@balajis-qb balajis-qb force-pushed the refactor/date-utils branch 2 times, most recently from 321d5d7 to 26c4384 Compare January 9, 2026 10:43
- Function name updated to reflect day-of-month behaviour
- Removed the unused locale argument
- Documentation updated to describe ddd formatting
- No functional changes
@balajis-qb balajis-qb force-pushed the refactor/date-utils branch from 26c4384 to 56574ba Compare January 9, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant