fix: make engineer tenure timezone independent - #504
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 16 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
8y, 0minstead of7y, 11mfor any viewer west of UTC:new Date('2018-08-01')parses as UTC midnight but was read back with local-time getters, shifting the anchor date to Jul 31. The duration is now computed entirely in UTC, includes days (7y, 11m, 18d), and is calculated after mount so the statically prerendered HTML never mismatches on hydration.lib/calendar.tsascalendarDurationBetween(); month-end anchors cap to shorter months (date-fns convention), fixing a latent negative-days bug (Jan 31 → Mar 1returneddays: -1).TimeAsSoftwareEngineer(wasDaysAsSoftwareEngineer),CAREER_START_DATE(wasDATE_OF_CREATION, which collided withYEAR_OF_CREATEmeaning the site launch).Type
Linked spec or plan
None.
Test plan
pnpm verify:fullexits 0 locallylib/calendar.test.ts); component test pins the rendered format/dashboardin a UTC-negative timezone (e.g. America/New_York) and confirm the card shows7y, 11m, XdBreaking changes
None.