Skip to main content

Crate npdatetime

Crate npdatetime 

Source
Expand description

§NPDateTime

High-performance Nepali (Bikram Sambat) datetime library featuring both lightning-fast lookup-based conversions and high-precision astronomical calculations.

§Key Features

  • Hybrid Approach: Use embedded lookup tables for instant results or full astronomical theories (VSOP87, ELP-2000) for future-proof accuracy.
  • Modular Design: Easily swap between fast civil calendar logic and precise astronomical events.
  • Cross-Language: Architected for bindings in Python, JavaScript, Java, and PHP.
  • Performance: Core logic is written in Rust for maximum speed and memory safety.
  • No-std Support: Core components are designed to run on embedded systems.

§Feature Flags

  • lookup-tables (default): Enables CSV-backed pre-calculated calendar data (1975-2100 BS).
  • astronomical: Enables full solar and lunar position calculations for any date range.
  • std: Enables standard library features including Chrono integration.
  • wasm: Enables WASM bindings for web usage.

Re-exports§

pub use core::date::NepaliDate;
pub use core::error::NpdatetimeError;
pub use core::error::Result;

Modules§

core
Shared core types for the npdatetime library
lookup
prelude
Prelude for common imports

Constants§

VERSION
Library version