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 🙏

© 2025 – Pkg Stats / Ryan Hefner

natural-time-js

v2.0.6

Published

Natural time is a fresh, elegant, and coherent way of measuring the movements of time here on the Earth. This new time standard is based on common sense and the observation of natural cycles. Learn more: https://naturaltime.app. This JavaScript Class tran

Readme

Natural Time JS

A revolutionary approach to time measurement, realigning human experience with nature's rhythms.

The Natural Time Paradigm

Our current time system - the Gregorian calendar with its arbitrary months and 24-hour days - is a human construct disconnected from natural cycles. Natural Time proposes a return to cosmic truth:

  • Circular Time: Days measured in 360 degrees, following the sun's continuous journey
  • Location-Aware: Time calculations adjusted to your longitude, acknowledging Earth's rotation
  • Solar-Anchored Years: Each year begins at winter solstice, nature's true new year marker
  • 13 Perfect Moons: 28-day cycles matching the moon's natural rhythm (364 days)
  • Rainbow Days: 1-2 days outside the count to honor year completion and solar alignment

This isn't just a calendar reform - it's a return to measuring time through observable celestial events that have guided humanity for millennia.

Try Natural Time

🌟 Experience it yourself! The best way to understand Natural Time is to try it:

Natural time app

  • Web App: Visit naturaltime.app to see it in action
  • Source Code: Explore the app's implementation at github.com/sylvain441/natural-time-app
  • Features:
    • Works offline
    • Location-aware time calculations
    • Beautiful visualization of natural cycles
    • Powered by this JavaScript library

Installation

npm install natural-time-js

Usage

NaturalDate Class

The core class for working with Natural Time:

import { NaturalDate } from 'natural-time-js';

// Convert current time at longitude 5.2° E
const naturalDate = new NaturalDate(new Date(), 5.2);
console.log(naturalDate.toString()); // "004)04)01 113°00 NT+5.2"

Properties

// Time Properties
naturalDate.unixTime;    // Artificial gregorian date (UNIX timestamp)
naturalDate.time;        // Current time in degrees (0-359.999...)
naturalDate.nadir;       // Beginning of the day at current longitude (UNIX timestamp)

// Location
naturalDate.longitude;   // Longitude (-180° to +180°)

// Year Properties
naturalDate.year;        // Current year (year 1: 2012/2013)
naturalDate.yearStart;   // Beginning of the year at current longitude (UNIX timestamp)
naturalDate.yearDuration;// Days in current year (365 or 366)
naturalDate.dayOfYear;   // Current day of the year (1-366)

// Moon Properties
naturalDate.moon;        // Current moon (1-13, or 14 for rainbow days)
naturalDate.dayOfMoon;   // Current day of the moon (1-28)
naturalDate.weekOfMoon;  // Current week of the moon (1-4)

// Week Properties
naturalDate.week;        // Current week (1-53)
naturalDate.dayOfWeek;   // Current day of the week (1-7)

// Special Properties
naturalDate.isRainbowDay;// True if current day is rainbow day
naturalDate.day;         // Days since END_OF_ARTIFICIAL_TIME

// Constants
NaturalDate.END_OF_ARTIFICIAL_TIME; // 1356091200000 (2012-12-21 12:00:00 UTC)
NaturalDate.MILLISECONDS_PER_DAY;   // 86400000 (24*60*60*1000)

Utility Methods

naturalDate.toString();              // "004)04)01 113°00 NT+5.2"
naturalDate.toDateString();          // "004)04)01"
naturalDate.toTimeString();          // "113°00"
naturalDate.toLongitudeString();     // "NT+5.2"
naturalDate.toYearString();          // "004"
naturalDate.toMoonString();          // "04"
naturalDate.toDayOfMoonString();     // "01"

Astronomical Functions

Calculate precise celestial events and positions:

import { NaturalSunEvents, NaturalMoonPosition } from 'natural-time-js';

// Giza Pyramid coordinates
const latitude = 29.9791;
const longitude = 31.1341;
const naturalDate = new NaturalDate(new Date(), longitude);

// Get sun events for the day
const sunEvents = NaturalSunEvents(naturalDate, latitude);
console.log(sunEvents.sunrise);  // 70.567° (time in natural degrees)
console.log(sunEvents.sunset);   // 287.910°

// Get current moon position and phase
const moonInfo = NaturalMoonPosition(naturalDate, latitude);
console.log(moonInfo.phase);     // 74.861° (percentage of lunar cycle)
console.log(moonInfo.altitude);  // 64.323° (degrees above horizon)

Documentation

The library is fully documented using JSDoc. Generate the documentation with:

npm run docs

For live documentation updates during development:

npm run docs:dev

This creates HTML documentation in the docs directory.

Contribute

Natural time is open to contributions from free-thinking minds. Find your way through Github or email at: [email protected] to get in touch.

License

Read full license (Creative Common Zero)

Natural time is completely free to use, play, transform, improve... It operates under the law of Love. Follow your heart, fork it, spoon it! There is no need to ask for permission to do anything with it.

Acknowledgments

Natural time has been baking for a long time in a goat's mind while traveling around the world. Infinite gratitude to my beloved friends Uncle Skywalker and Ik: your precious insights into the Mayan universe were so inspiring.

Special thanks to Don Cross, author of the Astronomy Library for calculating celestial body events. https://github.com/cosinekitty/astronomy

It was a real pleasure to give birth of natural time during the spring/summer of 2022 in the peaceful French alps.

🌍 One love 🌎

🏔 🐐 🌞 🌈