npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@olsystem/lt-lh

v0.2.3

Published

OLS Sun Light Time system — Light Hour (LH) / dark hour (dh) conversion, Proper Day counter, and embeddable widgets for the OneLightSystem Light Calendar.

Readme

@olsystem/lt-lh

OLS Sun Light Time system — Light Hour (LH) / dark hour (dh) conversion, Proper Day (LD) counter, and embeddable widgets for the OneLightSystem Light Calendar.

npm version License: MIT


What Is Light Time?

The OLS Light Calendar helps you align with the Sun's natural rhythm instead of arbitrary clock time.

  • Light Hour (LH): 1LH–13LH = 6:00 AM to 6:00 PM (your natural daylight energy window)
  • Dark Hour (dh): 1dh–11dh = 7:00 PM to 5:00 AM (rest and recovery window, Q2.3)
  • Light Day (LD): Day count since Winter Solstice (Dec 22, 2024)
  • Light Year: Currently 3406 (starting from the first known Sun Light Meditation)

At 11:25 AM traditional time you may already be in 6LH — halfway through your natural light day. This simple awareness supports better circadian health, meditation timing, and daily energy flow.

Installation

npm install @olsystem/lt-lh

Quick Start

React Hook (Recommended)

import { useLightTime } from '@olsystem/lt-lh';

function LightTimeDisplay() {
  const { hour, day } = useLightTime();

  return (
    <div>
      <div className="light-time-value">{hour.lightTime}</div>
      <div>Light Day {day.day} • {day.quarterLabel} • Year {day.year}</div>
    </div>
  );
}

// Add this to your app stylesheet:
// .light-time-value {
//   font-size: 3rem;
//   font-weight: 800;
// }

TypeScript / JavaScript

import { getLightHour, getLightDay } from '@olsystem/lt-lh';

const hour = getLightHour();
console.log(hour.lightTime);        // "6LH"
console.log(hour.isLightHour);      // true

const day = getLightDay();
console.log(`Day ${day.day} • ${day.quarterLabel} • Year ${day.year}`);

Embeddable Vanilla Widgets (No build tools)

<!-- Light Hour Widget -->
<div id="ols-lighttime-widget"></div>
<script src="https://cdn.jsdelivr.net/npm/@olsystem/lt-lh/dist/widgets/ols-lighttime-widget.global.js"></script>
<script>initLightTimeWidget();</script>

<!-- Proper Day Widget -->
<div id="ols-calendar-widget" data-start-date="2024-12-22"></div>
<script src="https://cdn.jsdelivr.net/npm/@olsystem/lt-lh/dist/widgets/ols-calendar-widget.global.js"></script>
<script>initCalendarWidget();</script>

Styling note: No CSS is shipped with this package. The widgets render semantic HTML with BEM-style class names (ols-lighttime-*, ols-calendar-*, ols-orb-*, ols-arc-*). Your host page must provide the styles for these class names.

API Reference

| Function | Description | |---|---| | getLightHour(hourIndex?, date?) | Current Light Hour result (season-aware) | | getLightDay(date?, config?) | Proper Day + quarter + year | | useLightTime(config?) | React hook with auto-refresh (default 60s) | | getLightTimeTable(date?) | Full 24-entry conversion table (season-aware) | | formatLightTime(lightTime, verbose?) | Format Light Time label for display | | formatLightDay(info) | Format day info for display | | validateCoordinates(lat, lng) | Validate lat/lng via Zod schema | | generateSnippet(mode) | Copy-ready TypeScript snippet ("lh" or "lh+ld") | | getActiveQuarter(date?) | Returns active QuarterKey e.g. "Q2.3" | | getTimeData(date?) | Returns the season table for a given date |

Types

interface LightTimeConfig {
  epochDate?: string;       // Default: "2024-12-22"
  lightYearBase?: number;   // Default: 3406
  refreshInterval?: number; // Default: 60000 (ms)
}

New in v0.2.3

  • Seasonal table supportgetLightHour() and getLightTimeTable() now auto-select the correct season table based on the current date (Q2.2 / Q2.3)
  • 13LH season — 6:00 PM is now 13LH (not 1dh) during Q2.2 and Q2.3; dark hours reduce to 11dh, midnight shifts to 6dh
  • Corrected Proper Day epochgetLightDay() now counts from Dec 23, 2025 (matching olsme.com); today (Apr 26, 2026) correctly returns 125LD
  • New public APIgetActiveQuarter(), getTimeData(date?), LIGHT_TIME_MAP_Q22, LIGHT_TIME_MAP_Q23, QuarterKey type
  • Date-aware overloadsgetLightHour(hourIndex?, date?) and getLightTimeTable(date?) accept an optional date for testing and historical queries
  • LIGHT_TIME_MAP backward-compatible — still exported; returns current season's table

New in v0.1.2

  • Cleaner large toggles (only numbers — 6LH / 103LD)
  • Elegant modals: click LD → glowing calendar orb, click LH → solar day arc diagram
  • Draggable toggles + bottom Settings drawer
  • Font size control + TypeScript snippet generator inside Settings
  • Enhanced About section with circadian rhythm explanation and roadmap
  • All widgets converted to TypeScript with proper types and option interfaces

Light Time Reference Table

| Old 12h | Old 24h | Light Time | |----------|---------|------------| | 6:00 AM | 06:00 | 1LH | | 7:00 AM | 07:00 | 2LH | | 8:00 AM | 08:00 | 3LH | | 9:00 AM | 09:00 | 4LH | | 10:00 AM | 10:00 | 5LH | | 11:00 AM | 11:00 | 6LH | | 12:00 PM | 12:00 | 7LH | | 1:00 PM | 13:00 | 8LH | | 2:00 PM | 14:00 | 9LH | | 3:00 PM | 15:00 | 10LH | | 4:00 PM | 16:00 | 11LH | | 5:00 PM | 17:00 | 12LH | | 6:00 PM | 18:00 | 13LH | | 7:00 PM | 19:00 | 1dh |

(Full table available via getLightTimeTable(). Season tables: Q2.2 midnight=7dh · Q2.3 midnight=6dh)

Browser Support

  • Modern browsers (Chrome 80+, Firefox 78+, Safari 14+, Edge 80+)
  • Vanilla widgets are intended for the same modern browser baseline; ES5 output is not currently guaranteed by the build configuration
  • No eval() and no network calls; the shipped vanilla widgets do not rely on inline style attributes, so they do not require style-src 'unsafe-inline' on that basis

For Everyone

Install @olsystem/lt-lh on any website, browser extension, or desktop widget. No tracking. No login. Just sunlight truth.

Why it matters: At 6LH you have already lived half your natural daylight window. This helps individuals align sleep, activity, and Sun Light Meditation with real solar cycles — supporting better circadian health.

License

MIT — OneLightSystem OLS · olsme.com