fix(experience): start the tenure clock in June 2023; put the city on the company line - #225
Conversation
…y on the company line useExperienceCalculator counted from '2023-01-06' — a DD-MM slip that reads as 6 January — while the card and the résumé both say June 2023. For the first half of every year the hero stat and the card's tenure rolled over to the next year months before the anniversary. The hooks test now reads the month back from the card's own period string so the two cannot drift again. The card's location sat in its own row beside the tenure, where it read as where I am: "Chennai" there against "Pondicherry" in the hero and About copy. It is the employer's city, so it now sits on the company line the way the résumé writes it — "MulticoreWare Pvt Ltd · Chennai, India". Co-authored-by: Cursor <cursoragent@cursor.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
aswin-portfolio | 968b2d7 | Commit Preview URL Branch Preview URL |
Sep 03 2026, 05:52 AM |
Aswincloud-Bot
left a comment
There was a problem hiding this comment.
Auto-approved: @Aswinmcw is a member of @Aswincloud/admins.
There was a problem hiding this comment.
🔵 Needs a closer look
The new date-only start string is parsed as UTC and the hook uses local getMonth()/getFullYear(), which can skew tenure for users in some time zones unless the calculation is made time-zone stable.
Pull request overview
This PR aligns the experience/tenure calculation and display with the intended “June 2023 – Present” start, and adjusts the experience card’s location formatting so the city is clearly attached to the employer rather than the person.
Changes:
- Exported a shared
EXPERIENCE_STARTconstant and used it inuseExperienceCalculator. - Updated
ExperienceEntrylayout to show employer location on the company line and put tenure on its own line. - Updated and extended hook tests to pin the corrected timeline and keep the hook consistent with the experience card period string.
File summaries
| File | Description |
|---|---|
| src/hooks/useExperienceCalculator.js | Introduces EXPERIENCE_START and uses it as the start date for tenure calculations. |
| src/components/ExperienceEntry.jsx | Reworks the header/meta layout so employer location appears on the company line and tenure is separated. |
| src/tests/hooks.test.js | Updates experience calculation fixtures and adds a consistency test against the experience card period string. |
Review details
Suppressed comments (1)
src/hooks/useExperienceCalculator.js:25
new Date(EXPERIENCE_START)uses a date-only ISO string, which is parsed as UTC midnight. On west-of-Greenwich time zones that becomes the prior local day, andgetMonth()/getFullYear()will treat the start month as May instead of June, skewing the tenure for some viewers. Use UTC month/year arithmetic (or parse as a local date) so the output is stable across client time zones.
const startDate = new Date(EXPERIENCE_START);
const currentDate = new Date();
const diffInMonths =
(currentDate.getFullYear() - startDate.getFullYear()) * 12 +
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
useExperienceCalculatorusednew Date('2023-01-06')(6 January) while the experience card and the résumé both say June 2023 — a DD-MM slip. Between January and June each year the hero "Experience" stat and the MulticoreWare card's tenure rolled over to the next year several months before the real anniversary (e.g. "3+ years" in March 2026 when it was 2 years 9 months). The start date is now an exportedEXPERIENCE_START = '2023-06-01', and a new test reads the month back fromgetExperienceData()'s period string so the hook and the card can't disagree again. The existing date-table tests were re-derived from the correct start and pinned one of the previously-wrong dates (2026-03-15 → "2+ years").MulticoreWare Pvt Ltd 📍 Chennai, India), and the tenure gets its own line. No facts changed; only which noun the city is attached to.Test plan
npm run lint,format:check,test:coverage(367 passed, thresholds met),build,test:e2e(37 passed).·did dangle, so the pin icon is the only separator).Made with Cursor