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

@z-yue/calendar

v1.2.3

Published

根据当前阳(公)历日期获取阴(农)历日期,节日

Readme

@z-yue/calendar

日历工具,获取指定时间的农历(阴历)信息。包括阳历节日、阴历节日。

Usage

import Calendar from '@z-yue/calendar'
const calendar = new Calendar(new Date(2020, 11, 31))
console.log(calendar)

Result

{
  "now": "2020-12-30T16:00:00.000Z",
  "year": 2020,
  "month": 12,
  "date": 30,
  "day": 3,
  "isTombSweeping": false,
  "isValentineDay": false,
  "isAprilFoolDay": false,
  "isChristmas": false,
  "isHalloween": false,
  "isNewYear": false,
  "festival": "",
  "fullFestival": "",
  "lunar": {
    "now": "庚子年11月17日 0:00:00",
    "full": "庚子年冬月十七",
    "year": "庚子年",
    "month": 11,
    "date": 17,
    "lunarMonth": "冬月",
    "lunarDate": "十七",
    "isBigMonth": true,
    "isSmallMonth": false,
    "isNewYear": false,
    "isLantern": false,
    "isDoubleSeventh": false,
    "isDoubleNinth": false,
    "isMidAutumn": false,
    "festival": ""
  }
}

结果参数类型 Calendar 阳(公)历

| 参数 | 描述 | 类型 | | -------------- | :-----------------------: | ------: | | now | 当前时间 | Date | | year | 当前年份 | number | | month | 当前月份 | number | | date | 当前日期 | number | | day | 周几 | number | | isTombSweeping | 清明节 🙇🏻 | boolean | | isValentineDay | 清明节 🌹 | boolean | | isAprilFoolDay | 愚人节 🤡 | boolean | | isChristmas | 圣诞节 🎄 | boolean | | isHalloween | 万圣节 🎃 | boolean | | isNewYear | 新年 🎉 | boolean | | festival | 节日 | string | | fullFestival | 节日(阳历 阴历)空格分隔 | string |

结果参数类型 ChineseCalendar 阴(农)历

| 参数 | 描述 | 类型 | | --------------- | :-----------------: | ------: | | now | 当前时间 | Date | | year | 当前阴历年份 | number | | month | 当前阴历月份 | number | | date | 当前阴历日期 | number | | lunarMonth | 当前阴历中文月份 | string | | lunarDate | 当前阴历中文日期 | string | | isBigMonth | 是否阴历大月(30 天) | boolean | | isSmallMonth | 是否阴历小月(29 天) | boolean | | isNewYear | 新年 🎉 | boolean | | isLantern | 元宵节 🥣 | boolean | | isDoubleSeventh | 七夕节 🎋 | boolean | | isDoubleNinth | 重阳节 🌱 | boolean | | isMidAutumn | 中秋节 🥮 | boolean | | festival | 节日 | string |