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

date-time-kit

v1.0.0

Published

A JavaScript library for handling date and time operations efficiently.

Readme

date-time-kit

GitHub license npm version GitHub stars

📌 简介

date-time-kit是一个功能强大且易于使用的 TypeScript 库,旨在解决 [web前端 时间区间选择] 的问题。它适用于 [所有web环境],并提供高效、轻量级的解决方案。

✨ 特性

  • 🚀 特性 1 - js原生开发,不依赖任何第三方框架
  • 🎯 特性 2 - 非常小 仅需几十kb
  • 📦 特性 3 - 提供国际化,时区控制,精确到毫秒
  • 🔥 适用于浏览器
  • ✅ 易于集成,支持 TypeScript

📦 安装

使用 npm 安装:

npm install @gez/date-time-kit

使用 yarn 安装:

yarn add @gez/date-time-kit

🚀 快速开始

在 ES6 环境中使用

import { open } from 'date-time-kit';

const result = awiat open({
    root: document.getElementById('root')
});
console.log(result);

📖 API 文档

open(option)

  • option (kitOption): 初始化对象
     export interface kitOption {
            root: HTMLElement,
            // default select
            startTime?: timeString, 
            endTime?: timeString,
            // default limit
            maxTime?: timeString,
            minTime?: timeString,
            // default lang
            lang?: lang, // zhCN, enUS ...
            // default time zone
            timeZone?: number // -12 - 12
        }
    export type timeString = `${number}-${number}-${number} ${number}:${number}:${number}:${number}`;
  • 返回值: kitResult
        export interface kitResult {
            startTime: timeString,
            endTime: timeString,
            // time stamp
            startTimeStamp: number,
            endTimeStamp: number,
            timeZone: number
        }
    

示例:

import dataTimeKit from 'date-time-kit';

const result = awiat dataTimeKit.open({
    root: document.getElementById('root')
});
console.log(result);

💡 示例代码

const result = awiat dataTimeKit.open({
    root: document.getElementById('root'),
    maxTime: "1990-01-01 00:00:00:000",
    minTime: "2050-01-01 00:00:00:000",
    startTime: "1990-01-01 00:00:00:000",
    endTime: "2050-01-01 00:10:10:022",
    timeZone: 4
});
console.log(result);

🛠️ 贡献

欢迎贡献代码!请阅读 贡献指南 以了解如何提交 PR 或报告问题。

📄 许可证

本项目基于 MIT 许可证 进行发布。

📬 联系

如果你有任何问题或建议,请随时在 GitHub Issues 提交反馈,或通过 [email protected] 联系我们。


⭐️ 如果你觉得这个项目有用,欢迎给个 Star 支持我们!