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

zaravand-jallali-date

v1.12.5

Published

calculate gregorian date to jallali date and reverse

Downloads

25

Readme

zaravand-jallali-date

calculate gregorian date to jallali date and reverse

نصب

    npm install zaravand-jallali-date
    yarn add zaravand-jallali-date

استفاده سریع

    const Zaravand = require("zaravand-jallali-date");
    // [or] import Zaravand from "zaravand-jallali-date";

    const _date = new Zaravand();

    //to jallali
    let result =  _date.convert("2019/7/12", "fa");  // 1398/04/21   

    // to gregorian
    let result =  _date.convert("1398/04/21", "en");  // 2019/07/12 

seprator | exampele --- | --- / | 1398/01/01 \ | 1398\01\01 [space] | 1398 01 01 ( - ) | 1398-01-01 ( _ ) | 1398_01_01

آموزش قدم به قدم

    const Zaravand = require("zaravand-jallali-date");
    // [or] import Zaravand from "zaravand-jallali-date";
    const _date = new Zaravand();
    let result =  _date.convert("date", "kind" , "format");

Name | type | amount | deafult --- | --- | --- | --- date | string | - | - kind | string | "fa" or "en" | - output format | string | - | "yyyy/mm/dd"

number|formats| example --- | --- | --- 1|YYYY/MM/DD| 2019/07/12 2|DD/MM/YYYY|12/07/2019 3|YYYY/MMM/DD|2019/July/12 4|DD/MMM/YYYY|12/July/2019 5|MMM/YYYY|July/2019 6|YYYY/MMM |2019/July 7|YYYY/MM/DD/WW|2019/07/12 - Friday 8|YYYY/MMM/DD/WW|2019/July/12 - Friday 9|YYYY/MM/DDTHH:MM:SS|2019/07/12T12:20:30 10|DD/MM/YYYYTHH:MM:SS|12/07/2019T12:20:30 11|YYYY/MM/DDTHH:MM:SS.S|2019/07/12T12:20:30.134 12|DD/MM/YYYYTHH:MM:SS.S|12/07/2019T12:20:30.134 13|HH:MM:SS *|00:00:00 14|HH:MM *|00:00 15|RAW *|object

syntax | output format | result --- | --- | --- _date.convert("2019/7/12", "fa" , "DD/MM/YYYY") | "DD/MM/YYYY" | 21/04/1398 _date.convert("2019/7/12", "fa" , "YYYY/MMM/DD") | "YYYY/MMM/DD" |1398/تیرl/21 _date.convert("2019/7/12", "fa" , "DD/MMM/YYYY") | "DD/MMM/YYYY" |21/تیرl/1398 _date.convert("2019/7/12", "fa" , "MMM/YYYY") | "MMM/YYYY" |تیرl/1398 _date.convert("2019/7/12", "fa" , "YYYY/MMM") | "YYYY/MMM" |تیر/1398 _date.convert("2019/7/12", "fa" , "YYYY/MM/DD/WW") | "YYYY/MM/DD/WW" |1398/04/21 - جمعه _date.convert("2019/7/12", "fa" , "YYYY/MMM/DD/WW") | "YYYY/MMM/DD/WW" |1398/تیرl/21 - جمعه _date.convert("2019/7/12T22:22:22.12", "fa" , "YYYY/MM/DDTHH:MM:SS") | "YYYY/MM/DDTHH:MM:SS" | 1398/04/21T22:22:22 _date.convert("2019/7/12T22:22:22.12", "fa" , "DD/MM/YYYYTHH:MM:SS") | "DD/MM/YYYYTHH:MM:SS" | 21/04/1398T22:22:22 _date.convert("2019/7/12T22:22:22.12", "fa" , "YYYY/MM/DDTHH:MM:SS.S") | "YYYY/MM/DDTHH:MM:SS.S" | 1398/04/21T22:22:22.12 _date.convert("2019/7/12T22:22:22.12", "fa" , "DD/MM/YYYYTHH:MM:SS.S") | "DD/MM/YYYYTHH:MM:SS.S" | 21/04/1398T22:22:22.12 _date.convert("2019/7/12T22:22:22.12", "fa" , "HH:MM:SS") | "HH:MM:SS" * | 22:22:22 _date.convert("2019/7/12T22:22:22.12", "fa" , "HH:MM") | "HH:MM" * | 22:22 _date.convert("2019/7/12T22:22:22.12", "fa" , "RAW") | "RAW" * | {Month: "تیر",day: 21,dweek: "جمعه",hour: 22,minute: 22,month: 4,second: 22.12,year: 1398,numeric: 1562953942120}

method name | syntax | result --- | --- | --- year | _date.year(Date(),"fa") | 1398 Month | _date.Month(Date(),"fa") | تیر month | _date.month(Date(),"fa") | 4 day | _date.day(Date(),"fa") | 21 week | _date.week(Date(),"fa") | جمعه numeric | _date.numeric(Date(),"fa") | 1563203865000

خطا یابی

پیوند

read-more