Skip to content

feat: time calculator in Turkish - #31

Merged
halitsever merged 1 commit into
mainfrom
feat/saat-hesaplama
Dec 4, 2026
Merged

halitsever merged 1 commit into
mainfrom
feat/saat-hesaplama

Conversation

@halitsever

Copy link
Copy Markdown
Owner

Adds /tr/saat-hesaplama/, a Turkish time calculator. Everything runs in the page; the CSP is unchanged.

What the page does

  • İki saat arası süre: start and end time (08:30, 8.30, 8,30 or 0830), an optional break in minutes. Shows the result as "X saat Y dakika", the time before the break, total minutes and decimal hours (7,5 saat). An end earlier than the start counts as the next day: the sub line says "ertesi gün" and a note splits the time before and after midnight. A break longer than the span is reported and no result is shown.
  • Saate süre ekle / çıkar: a time plus or minus hours and minutes. Shows the resulting time and whether it lands on the same day, the next or previous day, or "n gün sonra/önce". Minutes over 59 carry into hours. Only the add/subtract choice is stored in localStorage.
  • Süre toplama: rows of hours and minutes with add and remove buttons. The total is shown as "X saat Y dakika", saat:dakika (no wrap at 24), total minutes and decimal hours.
  • Decimal hours use integer maths, rounded half up to 2 places. The formula shows ≈ when a value is rounded.
  • Copy is written in Turkish: "nasıl hesaplanır" with the formula and worked examples, a mesai and mola section citing 4857 sayılı İş Kanunu md. 41, 63, 68 and 69 (checked against the mevzuat.gov.tr text on 2026-12-04), a minutes-to-decimal-hours table built with the calculator's own function, and 6 FAQs with FAQPage JSON-LD. Links to /tr/gun-hesaplama/ and /tr/is-gunu-hesaplama/.
  • Turkish-only, as the Semrush data covers Turkish only. The English index entry points to the Turkish page with lang: "tr" and the "Turkish" badge, with no alternates.

Files: src/saat.js (pure logic), test/saat.test.mjs, src/saat-hesaplama.js (page script, added to SCRIPTS), saatTool in scripts/build.mjs, the TOOLS entry and page in scripts/content.mjs, an og card, browser checks, and a little CSS for the minute table.

Semrush (Turkiye, checked 2026-12-04)

Keyword Volume/mo KD
saat hesaplama 33,100 22
iki saat arası hesaplama 3,600 19

SERP top 10 for "saat hesaplama": onlinealarmkur.com/hours/, hesaplama.app/saat-farki, zaman-farki.hesaplama.net, hesapsonuc.com/saat-hesaplama, hangihesaplama.com saat-sure-hesaplama, a YouTube video, epochconverter.com/tr/tarih-farki, calkoo.com/tr/iki-saat-arasi-hesaplama, kariyer.net saat-farki-hesaplama, a Play Store app. SERP features: AI Overview, video.

No English data was gathered.

Page metadata: title "Saat hesaplama: iki saat arası süre ve mesai hesabı" (51 chars), description 142 chars, H1 "İki saat arası süre hesaplama".

Checks

  • npm test: 226 pass, 0 fail. This includes 10 new tests covering parsing, midnight crossing, a break longer than the span, negative shifts across several days, minute overflow and decimal-hour rounding.
  • npm run build: 30 pages, 21 tools.
  • Browser check: the new saat block at 1280 and 390 px and the index/404 blocks (21 tool cards, link to saat hesaplama) pass with no horizontal scroll, console errors or CSP violations. Screenshots at both widths were reviewed.
  • The full npm run check stops on this machine at the existing text repeater step that fills a 5 MB output (page.fill 30 s timeout at browser-check.mjs:631). The same timeout happens on main when only that block runs, so it is not caused by this change. With those two lines skipped in a temporary copy, every other block passes.
  • npm run og: rendered and reviewed public/og/saat-hesaplama.png. The other cards were reverted to their committed bytes.

@halitsever
halitsever merged commit cf0ece7 into main Dec 4, 2026
2 checks passed
@halitsever
halitsever deleted the feat/saat-hesaplama branch December 4, 2026 13:12
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.

1 participant