{"id":51144184,"url":"https://github.com/hawkeye64/timestamp","last_synced_at":"2026-06-26T01:30:43.607Z","repository":{"id":363438260,"uuid":"1263003922","full_name":"hawkeye64/timestamp","owner":"hawkeye64","description":"Framework-agnostic Timestamp utility for TypeScript.","archived":false,"fork":false,"pushed_at":"2026-06-19T10:34:36.000Z","size":1086,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-26T01:30:32.790Z","etag":null,"topics":["calendar","date","date-range","interval","time","time-range","timestamp"],"latest_commit_sha":null,"homepage":"https://timestamp-js.netlify.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hawkeye64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-08T14:26:29.000Z","updated_at":"2026-06-19T10:34:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hawkeye64/timestamp","commit_stats":null,"previous_names":["hawkeye64/timestamp"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hawkeye64/timestamp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hawkeye64%2Ftimestamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hawkeye64%2Ftimestamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hawkeye64%2Ftimestamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hawkeye64%2Ftimestamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hawkeye64","download_url":"https://codeload.github.com/hawkeye64/timestamp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hawkeye64%2Ftimestamp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34799570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calendar","date","date-range","interval","time","time-range","timestamp"],"created_at":"2026-06-26T01:30:34.116Z","updated_at":"2026-06-26T01:30:43.599Z","avatar_url":"https://github.com/hawkeye64.png","language":"TypeScript","funding_links":["https://github.com/sponsors/hawkeye64","https://paypal.me/hawkeye64"],"categories":[],"sub_categories":[],"readme":"# Timestamp\n\n[![npm](https://img.shields.io/npm/v/@timestamp-js/core?label=@timestamp-js/core)](https://www.npmjs.com/package/@timestamp-js/core)\n[![Netlify Status](https://api.netlify.com/api/v1/badges/4020c938-0242-48ed-9069-c774e3909bfd/deploy-status)](https://app.netlify.com/projects/timestamp-js/deploys)\n[![Verify Timestamp](https://github.com/hawkeye64/timestamp/actions/workflows/run-vitest.yml/badge.svg)](https://github.com/hawkeye64/timestamp/actions/workflows/run-vitest.yml)\n[![License](https://img.shields.io/npm/l/@timestamp-js/core)](https://github.com/hawkeye64/timestamp/blob/master/LICENSE)\n[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/hawkeye64/timestamp)](https://github.com/hawkeye64/timestamp)\n[![GitHub repo size in bytes](https://img.shields.io/github/repo-size/hawkeye64/timestamp)](https://github.com/hawkeye64/timestamp)\n[![npm downloads](https://img.shields.io/npm/dt/@timestamp-js/core)](https://www.npmjs.com/package/@timestamp-js/core)\n\nFramework-agnostic TypeScript utilities for date-only, time-only, date-time, interval, and range workflows in browsers, Node.js, and modern JavaScript runtimes.\n\nTimestamp focuses on immutable plain objects and small utility functions. It is intentionally independent of any UI framework, backend framework, or application platform.\n\nThe package is ESM, side-effect free, and designed for tree-shaking. Prefer named imports so bundlers can keep only the helpers your app actually uses.\n\n## Install\n\n```bash\npnpm add @timestamp-js/core\n```\n\n## Basic Usage\n\n```ts\nimport { addToDate, addToDateClamped, getDateTime, parseTimestamp } from '@timestamp-js/core'\n\nconst start = parseTimestamp('2026-06-08T09:30:15.250Z')\nconst end = start ? addToDate(start, { day: 2, minute: 45 }) : null\nconst billingDate = start ? addToDateClamped(start, { month: 1 }) : null\n\nconsole.log(end ? getDateTime(end) : 'Invalid date') // 2026-06-10 10:15:15.250\nconsole.log(billingDate ? getDateTime(billingDate) : 'Invalid date') // 2026-07-08 09:30:15.250\n```\n\n## Timestamp Values\n\nTimestamp objects are immutable. Parsers and update helpers return frozen objects, and functions that change date/time fields return a new Timestamp instead of mutating the original.\n\n```ts\nconst start = parseTimestamp('2026-06-08 09:30')!\nconst next = addToDate(start, { day: 1 })\n\nconsole.log(start.date) // 2026-06-08\nconsole.log(next.date) // 2026-06-09\n```\n\n## Supported Input Shape\n\nThe parser accepts compact calendar inputs and fuller ISO-style date-time inputs:\n\n- `2026-06-08`\n- `2026-06-08 09:30`\n- `2026-06-08T09:30`\n- `2026-06-08T09:30:15`\n- `2026-06-08T09:30:15.250Z`\n- `2026-06-08T09:30:15.250-07:00`\n\nSeconds, milliseconds, and timezone suffixes are optional. Timezone suffixes are preserved on the Timestamp object, but the parser does not convert the wall-clock values into another zone.\n\n## SSR And Runtime Compatibility\n\nTimestamp is designed for server-rendered and client-rendered applications. The package is ESM, side-effect free, and does not depend on browser globals such as `window`, `document`, `navigator`, or storage APIs.\n\nThe library relies on standard JavaScript runtime APIs such as `Date` and `Intl.DateTimeFormat`, so it works in modern Node.js, browser, serverless, and edge-style runtimes that provide those APIs.\n\nFor deterministic SSR output, prefer passing explicit timestamps into helpers instead of calling `today()` during render. `today()` intentionally uses the host runtime clock and timezone.\n\n# Structure\n\nThis is a pnpm workspace mono-repo. You cannot use npm for building.\n\n- [/lib](packages/lib) - standalone npm package (go here for more information)\n- [/docs](packages/docs) - Q-Press documentation site with docs, demos, and examples\n- [live demo](https://timestamp-js.netlify.app/) - **live Q-Press docs, demos, and examples**\n\n## Documentation\n\n```bash\npnpm docs:dev\npnpm docs:build\n```\n\n## Current Scope\n\n- Parse date strings and ISO-like date-time strings into Timestamp objects.\n- Convert native `Date` objects into Timestamp objects.\n- Compare dates, times, date-times, and timestamp ranges, including optional second and millisecond precision.\n- Generate day and interval lists for calendar-style views.\n- Format weekday and month names through `Intl.DateTimeFormat`.\n- Keep the public surface small, typed, immutable, and runtime-agnostic while the package stabilizes.\n\n## Development\n\n```bash\npnpm install\npnpm verify\n```\n\n## Support\n\nIf Timestamp is useful in your workflow and you want to support ongoing maintenance:\n\n- GitHub Sponsors: https://github.com/sponsors/hawkeye64\n- PayPal: https://paypal.me/hawkeye64\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhawkeye64%2Ftimestamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhawkeye64%2Ftimestamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhawkeye64%2Ftimestamp/lists"}