tempoch-js
ActiveJavaScript and WebAssembly bindings for astronomical time primitives: Julian Date, Modified Julian Date, UTC conversion, and periods.
0 stars
0 forks
JavaScript
AGPL-3.0
Updated today
Why it exists
tempoch-js brings Siderust’s typed astronomical time model to JavaScript. The workspace ships aligned Node and browser packages that preserve the same strongly-typed Julian date, UTC, and period concepts used by the Rust backend.
Key Features
- Node package: @siderust/tempoch
- Browser/WASM package: @siderust/tempoch-web
- JulianDate, ModifiedJulianDate, and Period APIs
- Interop with qtty-js quantity objects
- TypeScript declarations for both targets
Getting Started
npm install @siderust/tempoch @siderust/qtty
const { JulianDate } = require('@siderust/tempoch');
const { Hours } = require('@siderust/qtty/units');
const jd = JulianDate.j2000();
const later = jd.add(Hours(6));
console.log(later.toDate().toISOString()); Contributing
We welcome contributions! Here's how you can help:
- 1 Fork the repository and create your branch from main
- 2 Make your changes and add tests if applicable
- 3 Ensure all tests pass with cargo test
- 4 Submit a pull request with a clear description
License
This project is licensed under the AGPL-3.0 license. See the LICENSE file for details.
Quick Links
Tags
javascript wasm node browser time astronomy bindings