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

neptime

v1.1.2

Published

An npm package to convert English time to Nepali time with accurate time conversion.

Readme

neptime

nepTime is a lightweight npm module for displaying the current time in Nepali numerals.

Installation

npm install nepTime

Example HTML Usage

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Nepali Time Example</title>
</head>
<body>
    <h2>Time in Different Formats</h2>
    <div>
        <p>hh-mm-ss (Nepali): <span id="nepali-time-hh-mm-ss"></span></p>
        <p>hh-mm (Nepali): <span id="nepali-time-hh-mm"></span></p>
        <p>HH-MM-SS (English): <span id="nepali-time-HH-MM-SS"></span></p>
        <p>HH-MM (English): <span id="nepali-time-HH-MM"></span></p>
    </div>

    <script type="module">
        import NepTime from 'neptime';

        NepTime({ color: 'black', bgColor: 'white', format: 'hh-mm-ss', elementId: 'nepali-time-hh-mm-ss' });
        NepTime({ color: 'black', bgColor: 'white', format: 'hh-mm', elementId: 'nepali-time-hh-mm' });
        NepTime({ color: 'black', bgColor: 'white', format: 'HH-MM-SS', elementId: 'nepali-time-HH-MM-SS' });
        NepTime({ color: 'black', bgColor: 'white', format: 'HH-MM', elementId: 'nepali-time-HH-MM' });
    </script>
</body>
</html>

React Usage

To use nepTime in a React project:

  1. Import nepTime and call it inside a useEffect hook to ensure it runs after the component mounts.
  2. Add a div with the corresponding ID where you want the time to display.
import React, { useEffect } from 'react';
import NepTime from 'neptime';

const NepaliTimeComponent = () => {
    useEffect(() => {
        NepTime({ color: 'black', bgColor: 'white', format: 'hh-mm-ss', elementId: 'nepali-time-hh-mm-ss' });
        NepTime({ color: 'black', bgColor: 'white', format: 'hh-mm', elementId: 'nepali-time-hh-mm' });
        NepTime({ color: 'black', bgColor: 'white', format: 'HH-MM-SS', elementId: 'nepali-time-HH-MM-SS' });
        NepTime({ color: 'black', bgColor: 'white', format: 'HH-MM', elementId: 'nepali-time-HH-MM' });
    }, []);

    return (
        <div>
            <h2>Time in Different Formats</h2>
            <p>hh-mm-ss (Nepali): <span id="nepali-time-hh-mm-ss"></span></p>
            <p>hh-mm (Nepali): <span id="nepali-time-hh-mm"></span></p>
            <p>HH-MM-SS (English): <span id="nepali-time-HH-MM-SS"></span></p>
            <p>HH-MM (English): <span id="nepali-time-HH-MM"></span></p>
        </div>
    );
};

export default NepaliTimeComponent;

Options

The NepTime function accepts an options object to customize the appearance and format of the time display.

| Option | Type | Default | Description | |------------|--------|---------------|--------------------------------------------------------------------| | color | string | 'black' | Sets the text color of the displayed time. | | bgColor | string | 'white' | Sets the background color of the displayed time. | | format | string | 'hh-mm-ss' | Defines the time format (hh-mm-ss, hh-mm, HH-MM-SS, HH-MM). | | elementId| string | 'nepali-time' | The ID of the HTML element where time should be displayed. |

  • Lowercase (hh) formats display time in Nepali numerals.
  • Uppercase (HH) formats display time in English numerals.
  • 12-hour format (hh) includes AM/PM.
  • 24-hour format (HH) does not include AM/PM.

Example of Different Formats:

NepTime({ format: 'hh-mm-ss' }); // १२:३०:४५ (Nepali, 12-hour AM/PM)
NepTime({ format: 'hh-mm' });    // १२:३० (Nepali, 12-hour AM/PM)
NepTime({ format: 'HH-MM-SS' }); // 12:30:45 (English, 24-hour)
NepTime({ format: 'HH-MM' });    // 12:30 (English, 24-hour)