Skip to content

fix(experience): start the tenure clock in June 2023; put the city on the company line - #225

Merged
Aswinmcw merged 1 commit into
mainfrom
fix/experience-date-and-location
Sep 3, 2026
Merged

fix(experience): start the tenure clock in June 2023; put the city on the company line#225
Aswinmcw merged 1 commit into
mainfrom
fix/experience-date-and-location

Conversation

@Aswinmcw

@Aswinmcw Aswinmcw commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Tenure was counted from the wrong date. useExperienceCalculator used new 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 exported EXPERIENCE_START = '2023-06-01', and a new test reads the month back from getExperienceData()'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").
  • Two cities for one person. The card showed "Chennai, India" in its own meta row next to the tenure, where it read as where I am — against "Pondicherry, India" in the hero eyebrow, the About copy, the contact card and the JSON-LD. Chennai is MulticoreWare's location, so it now sits on the company line the way the résumé writes it (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).
  • Card checked in headless Chromium at 1280px and 390px — the location wraps under the company name on mobile without a dangling separator (an earlier · did dangle, so the pin icon is the only separator).

Made with Cursor

…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>
Copilot AI lite review requested due to automatic review settings September 3, 2026 05:52
@Aswinmcw
Aswinmcw requested review from a team and Aswin-coder as code owners September 3, 2026 05:52
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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 Aswincloud-Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: @Aswinmcw is a member of @Aswincloud/admins.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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_START constant and used it in useExperienceCalculator.
  • Updated ExperienceEntry layout 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, and getMonth()/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.

Merged via the queue into main with commit 4778002 Sep 3, 2026
15 checks passed
@Aswinmcw
Aswinmcw deleted the fix/experience-date-and-location branch September 3, 2026 05:56
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