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

@owneul/kate

v1.0.11

Published

Very Simple Date data manage Module

Downloads

11

Readme

Kate

Very Simple Date data manage Module(javascript)

NPM Version

Install

npm i @owneul/kate

Usage

var kate = new Kate('2019년 4월 18일');
var formatted = kate.format('yyyy.mm.dd ap h시 i분 s초');
console.log(formatted); // 2019.04.18 오전 12시 0분 0초

// add~ methods return copy of Kate Object. (new Instance)
var copied = kate.addDays(10);
console.log(copied.format('yy/m/d HH:ii:ss')); // 19/4/28 00:00:00

// set~ methods return original Kate Object. (not create new Instance)
kate.setHours(23).setMinutes(59).setSeconds(59); // 2019.04.18 오후 11시 59분 59초
console.log(kate.format('yyyy.mm.dd ap h시 i분 s초'));

var dateIntervalFrom1991_02_01 = kate.diffInDays('1991-02-01');
console.log(dateIntervalFrom1991_02_01); // -10303

format() arguments

| replace | to | result | |--------|-------|------| | yyyy | Full Year(4) | 1991 | |yy|Simple Year(2)|91| |mm|zerofilled month|02| |m|non-zerofill month|2| |dd|zerofilled date|01| |d|non-zerofill date|1| |E|day label|금(Fri)| |HH|zerofilled hours(24H)|17| |H|non-zerofill hours(24H)|5| |hh|zerofilled hours(12H)|05| |h|non-zerofill hours(12H)|5| |ii|zerofilled minutes|09| |i|non-zerofill minutes|9| |ss|zerofilled minutes|01| |s|non-zerofill minutes|1| |ap|meridiem label|오전(AM)|

set custom labels

Kate.setMeridiemLabels(['AM', 'PM']);
Kate.setDayLabels(['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']); // start with sunday

License

MIT