Skip to content

Conversation

@zChanges
Copy link
Contributor

@zChanges zChanges commented Jan 15, 2026

Angular DatePipe 遵循 CLDR 规范,YYYY 表示周所属年而非日历年。
在 12 月底(如 12-28 ~ 12-31)会被解析为下一年,导致页面年份展示错误。
image

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the date format used in the date range picker footer to use the standard calendar-year convention, preventing incorrect year displays near year-end and ensuring consistent date rendering.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Jan 15, 2026

🦋 Changeset detected

Latest commit: e790252

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@alauda/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

Walkthrough

The DateRangePickerPanelComponent's footer date format constant was changed from 'YYYY-MM-dd' to 'yyyy-MM-dd' and clarifying comments about Angular DatePipe CLDR year formats were added; a changeset file for a patch release was also added.

Changes

Cohort / File(s) Summary
Date Format Configuration
src/date-picker/calendar/range-picker-panel/component.ts
Changed FOOTER_DATE_FORMAT from 'YYYY-MM-dd' to 'yyyy-MM-dd' and added comments explaining Angular DatePipe uses CLDR formats and the distinction between week-based year (YYYY) and calendar year (yyyy).
Release Changeset
.changeset/little-chefs-relate.md
Added a changeset entry describing a patch release for @alauda/ui and noting the date format fix.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A tiny hop, a format flip,
From YYYY down to yyyy's tip,
Comments whisper CLDR's rule,
The picker ticks with tidy cool,
Hooray—a clearer date on the trip! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'fix: date format year' directly addresses the main change: updating the date format from 'YYYY-MM-dd' to 'yyyy-MM-dd' to fix year formatting issues with Angular DatePipe's CLDR format specifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

🧹 Recent nitpick comments
.changeset/little-chefs-relate.md (1)

1-5: Consider adding more context to the changeset description.

The current description "fix: date format year" is minimal. Given the technical nature of this fix (YYYY week-year vs yyyy calendar year in Angular DatePipe CLDR formats), consider expanding the description to help users understand what was fixed when they review the changelog.

📝 Suggested improvement
 ---
 "@alauda/ui": patch
 ---
 
-fix: date format year
+fix: correct date format from YYYY (week-year) to yyyy (calendar year)
+
+Fixed DateRangePickerPanel footer date format to use 'yyyy-MM-dd' instead of 'YYYY-MM-dd'. 
+The YYYY format represents week-based year in Angular DatePipe CLDR specification, which can 
+cause dates in late December to display the next year incorrectly.

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f9574d8 and e790252.

📒 Files selected for processing (2)
  • .changeset/little-chefs-relate.md
  • src/date-picker/calendar/range-picker-panel/component.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/date-picker/calendar/range-picker-panel/component.ts

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zChanges zChanges force-pushed the fix/date-format-year branch from f9574d8 to e790252 Compare January 15, 2026 02:33
@fengtianze fengtianze merged commit dea9672 into master Jan 15, 2026
7 checks passed
@fengtianze fengtianze deleted the fix/date-format-year branch January 15, 2026 05:46
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.

3 participants