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

j-date

v0.0.5

Published

Date class implementation in Jalali calendar

Downloads

37

Readme

Date class implementation in Jalali calendar

JDate aka Date class implementation for Jalali calendar

This package aimed to develop and maintain Jalaali Calendar also called Persian Calendar in the form of Javascript Date Class, Basically we have a JDate class with identical interface and behavior of Data class

I believe we need more atomic libraries in javascript that are independent of other frameworks/libs. this package is one of those atomics, I searched a lot to find a real implementation of Date class for Jalali calendar and found a few. All of them was not really identical with Date class in term of interface and behavior. the only on that was close to this idea was jdate and it was pure in coding, maintenance and modern development, still I'm not sure about it's possible logical bugs! I refactored this code to a modern and modular npm package for ease of use in modern work flow.

installation

npm install j-date --save

usage

using node, webpack, browserify and other commonjs modular environments

var JDate = require('./dist/j-date.src').JDate;

// will log someting like 1394/12/02 03:30:00
console.log((new JDate('1394-12-2')).toLocaleString());
// using harmony modules
// default export
import JDate from 'j-date'

// or named export
import { JDate } from 'j-date' 

using globals in browser download dist/j-date.js and load it using script tag

// will log someting like 1394/12/02 03:30:00
console.log((new JDate('1394-12-2')).toLocaleString());

Contribution

Fork this repo and always keep your code on a git branch other than master branch,

Setting up dev environment

requirements npm 3.. or upper
node 4.. or upper

git clone clone [email protected]:you/j-date.git
npm install
npm run serve

run build script to make sure build passes without errors

npm run build

TO DO:

  • Writing Tests

  • Making sure it's identical to Date

  • Refactor code

  • Resolve eslint errors

  • Document known differences to Data Class

  • Writing documentation