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 🙏

© 2024 – Pkg Stats / Ryan Hefner

lday

v0.1.0

Published

简化的自定义时间库

Downloads

2

Readme

LDay

  • isLeap 是否是闰年 返回Boolean

  • format 格式化 返回值为字符串

  • isSame 是否是相同时间 参数为另一个Day对象 返回值为Boolean

  • day 是星期几,从1开始 返回值为number

  • dayOfYear 是一年内的第几天 返回值为number

  • week 一年内第几周 返回值为number

  • add 加 参数:1. 数值 2. 关键字('y','year','M','month','d','date','h','hour','m','minute','s','second','ms','millisecond') 返回新的Day对象

  • subtract 减 同add

  • daysInMonth 获取本月天数 参数:关键字('y','year','M','month','d','date','h','hour','m','minute','s','second','ms','millisecond') 返回值number

  • get 获取数据 参数:关键字('y','year','M','month','d','date','h','hour','m','minute','s','second','ms','millisecond','w','day')

  • toArray 转换成数组 返回值:[年 月 日 时 分 秒 星期几]构成的数组

  • extend 对LDay进行扩展 参数:Lday, oldPro, option Lday方法 Day类的旧属性 用户配置项

  • unix 返回unix时间戳

  • LDay.unix(num) 返回以num为时间戳的LDay对象

  • LDay.isLDay 参数: 任意类型数据 返回: Boolean 是否是LDay对象

浏览器使用

<script src="https://cdn.jsdelivr.net/npm/[email protected]/LDay.js"></script>
<script>
    console.log(LDay());
  </script>