# Timestamp checker v1

Review explicit timestamp text locally using the same strict parser as the browser.
Dependency-free ES module for modern JavaScript or Node 18+. No network, file reads,
telemetry or Google access. Download timestamp-checker.mjs beside this example:

```js
import { checkTimestamps, parseTimestamp } from './timestamp-checker.mjs';
console.log(checkTimestamps('2026-09-26T09:00-04:00\n2026-09-26T13:00Z'));
// checked: 2, issues: 1; second line is the same instant as the first.
console.log(parseTimestamp('2026-09-26T09:00-04:00'));
// { iso: '2026-09-26T13:00:00.000Z', milliseconds: 1790427600000 }
```

Save as check.mjs and run `node check.mjs`. `checkTimestamps(input)` returns
`{ lines, checked, issues }`: every original line is counted, including blanks;
one finding per invalid or repeated line. Empty, over 500 lines or over 100,000
characters throws. A final newline is allowed. Repeated instants are review
findings, not proof of duplicate Calendar events.

`parseTimestamp(text)` returns `{ iso, milliseconds }` or `{ error }`.
Supported syntax: YYYY-MM-DDTHH:mm[:ss[.SSS]] followed by Z or ±HH:mm.
Seconds are optional; fractions require seconds and allow 1–3 digits. Strict
calendar dates, years 0001–9999 before/after conversion, offsets ±14:00 maximum.
Missing offsets, unknown -00:00, whitespace, named zones and leap seconds are
flagged. This bounded format is not full ISO/RFC support. It cannot infer DST,
choose your timezone, validate an event or change data. Input stays text.

Generated from site/lib/timestamp-check.ts by scripts/build-timestamp-checker.mjs;
`node scripts/build-timestamp-checker.mjs --check` verifies exact source parity.
Downloads are not observed local executions. No speed or correctness advantage
over native date handling is claimed.

## License

MIT License

Copyright (c) 2026 QuasiLife

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
