chinese-lunar-date API - v1.0.5
    Preparing search index...

    Function midnight

    Low-level pure functions for calendar conversion. Most users should prefer the ChineseDate value object API. These functions are useful when you need fine-grained control or want to build custom logic on top of the core algorithms.

    • Truncate JDE to midnight in the calendar's local timezone

      Converts a JDE timestamp to the start of the local calendar day. This is critical because the same astronomical event (e.g., new moon) may fall on different calendar days depending on the timezone.

      Parameters

      • config: CalendarConfig

        Calendar configuration (provides timezone offset)

      • jde: number

        Julian Ephemeris Day

      Returns number

      JDE truncated to local midnight