Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 2 min read

Japan's minimum wage isn't one number on a given day: resolving staggered effective dates in code

Japan sets its minimum wage per prefecture (47 of them), and each prefecture's new rate starts on its own effective date. For FY2026 most prefectures switched in October/November, but as of 24 Nov 2026 three had not swit

Japan sets its minimum wage per prefecture (47 of them), and each prefecture's new rate starts on its own effective date. For FY2026 most prefectures switched in October/November, but as of 24 Nov 2026 three had not switched yet: Iwate and Kumamoto (1 Dec) and Okinawa (2 Dec).

So "what is the minimum wage in Okinawa?" has two right answers depending on the date. Payroll checks, job boards, and AI agents that answer "is this job offer legal?" get it wrong when they cache one "current" value.

1. Store both rates with their dates, not "current"

The official source is MHLW. The yearly list is a PDF; the history (H14 to R8) is an XLSX that also carries the previous rate and its effective date. I parse both and abort the build on any mismatch (all 47 matched).

{ "pref": "Okinawa", "fy2026": { "yen": "...", "effective": "2026-12-02" },
  "previous": { "yen": "...", "effective": "2025-..." } }

2. Resolve the rate for a date at query time

function rateOn(p, d) {            // d = 'YYYY-MM-DD' (JST)
  if (d >= p.fy2026.effective) return p.fy2026;
  if (d >= p.previous.effective) return p.previous;
  return null;                     // older than our data: say so, don't guess
}

ISO dates compare correctly as strings. With this, the staggered 1 Dec / 2 Dec switch is right on every date with no rebuild. After the end of the fiscal year, add a note that a newer rate may apply instead of silently serving a stale one.

3. Prefecture names come in many spellings

Users and LLMs send Tokyo, Toukyou, Hokkaidō, Kochi/Kouchi, JP-13, 13, 東京都, 東京. What worked:

  • Strip macrons, then fold ou/oo/uu β†’ o/u.
  • Strip -ken/-fu/-to only if 4+ characters remain β€” otherwise "Kyoto" loses its "to".
  • In Japanese, allow an optional 県/府/都/道 suffix, but never strip 都 from the name itself, or 京都 becomes δΊ¬.

4. Validate before you charge

My endpoint is pay-per-call (x402, 0.01 USDC on Base). Unknown prefecture, a bad date or a bad section returns 400 before the 402, so nobody pays for a typo.

5. Laws: the premium rates are not in the Labor Standards Act

If you also return overtime rules: the 25% overtime / 35% holiday premiums are set by a cabinet order (政什), not the Act itself; the Act only holds the 60h/50% and 25% night rules. The e-Gov API v1 returns full law text as XML, so you can cite article numbers instead of paraphrasing blogs.

Try it

  • HTTP: https://hodoyoku.pages.dev/api/v1/minimum-wage?pref=Okinawa&date=2026-12-02 (x402; no pref returns all 47)
  • Worker-rights summary with official help desks: /api/v1/worker-rights?section=minimum_wage|rights|help_desks|job_change
  • MCP server for agents: https://hodoyoku.pages.dev/mcp β€” tools get_japan_minimum_wage, get_japan_worker_rights (plus business-calendar, weather-warning and ticket-drop tools). Listed in the official MCP Registry.

Everything is sourced from MHLW and e-Gov; unverified items are flagged in the response rather than filled in.

Setup guide, tool list and curl examples: https://hodoyoku.pages.dev/agents

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.