tempoch-js
ActiveJavaScript and WebAssembly bindings for astronomical time types, periods, and UTC conversions.
0 stars
0 forks
JavaScript
AGPL-3.0
Updated 2 months ago
Why it exists
tempoch-js brings the same time model used in Rust to JavaScript. The Node and browser packages stay aligned, so Julian dates, UTC, and periods behave the same in both places.
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