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

shdate

v2.3.17

Published

Date and Time Related Extensions SH{Shamsi Hijri, Solar Hijri, Iranian Hijri}

Downloads

137

Readme

به نام خدا

تاریخ و زمان گاهشماری هجری شمسی (هجری خورشیدی, جلالی)

In the name of Allah, the Beneficent, the Merciful.

Date and Time - SH (Solar Hijri, Shamsi Hijri, Iranian Hijri)

GitHub license GitHub version release GitHub version dev  workflow test  workflow publish Static Badge npm

Language

Install

 npm i shdate

Usage

  • ES Modules (ESM):
import SHDate from "shdate";
var date = new SHDate();
  • CommonJS (CJS):
const SHDate = require("shdate").default;
var date = new SHDate();
  • TypeScript (TS):
const SHDate = require('shdate');
// OR
import SHDate from 'shdate';

var date = new SHDate();
  • ES Modules for the browser:
<script type="module">
	import SHDate from "shdate";
	var date = new SHDate();
</script>
  • client side for the browser:
<script
	type="text/javascript"
	src="/path/to/shdate/dist/browser/shdate.min.js"
></script>
<script>
	var date = new SHDate();
</script>

jsdrive:

https://cdn.jsdelivr.net/npm/shdate@latest/dist/browser/shdate.min.js

ubpkg:

https://unpkg.com/shdate@latest/dist/browser/shdate.min.js

Note

  • If you want to use ES Modules in Node.js without a transpiler, you need to add "type": "module" in your package.json or change your file extension from .js to .mjs.

Standard built-in objects

  • SHDate

Constructor

  • SHDate() constructor

Methods

  • [@@toPrimitive](): ( en | fa )

  • getDate(): ( en | fa )

  • getDay(): ( en | fa )

  • getFullYear(): ( en | fa )

  • getHours(): ( en | fa )

  • getMilliseconds(): ( en | fa )

  • getMinutes(): ( en | fa )

  • getMonth(): ( en | fa )

  • getSeconds(): ( en | fa )

  • getTime()( en | fa )

  • getTimezoneOffset()( en | fa )

  • getUTCDate()( en | fa )

  • getUTCDay()( en | fa )

  • getUTCFullYear()( en | fa )

  • getUTCHours()( en | fa )

  • getUTCMilliseconds()( en | fa )

  • getUTCMinutes()( en | fa )

  • getUTCMonth()( en | fa )

  • getUTCSeconds()( en | fa )

  • SHDate.now(): ( en | fa )

  • SHDate.parse(): ( en | fa )

  • setDate(): ( en | fa )

  • setDay: ( en | fa )

  • setFullYear(): ( en | fa )

  • setHours(): ( en | fa )

  • setMilliseconds(): ( en | fa )

  • setMinutes(): ( en | fa )

  • setMonth(): ( en | fa )

  • setSeconds(): ( en | fa )

  • setTime(): ( en | fa )

  • setUTCDate(): ( en | fa )

  • setUTCFullYear(): ( en | fa )

  • setUTCHours(): ( en | fa )

  • setUTCMilliseconds(): ( en | fa )

  • setUTCMinutes(): ( en | fa )

  • setUTCMonth(): ( en | fa )

  • setUTCSeconds(): ( en | fa )

  • toDateString(): ( en | fa )

  • toISOString(): ( en | fa )

  • toJSON(): ( en | fa )

  • toLocaleDateString(): ( en | fa )

  • toLocaleString(): ( en | fa )

  • toLocaleTimeString(): ( en | fa )

  • toString(): ( en | fa )

  • toTimeString(): ( en | fa )

  • toUTCString(): ( en | fa )

  • SHDate.UTC(): ( en | fa )

  • valueOf(): ( en | fa )

  • format: ( en | fa )

  • isLeapYear: ( en | fa )

  • static VERSION: ( en | fa )

  • static DAYS_IN_MONTH: ( en | fa )

  • static DAYS_IN_MONTH_LEAP: ( en | fa )

  • static DAY_OF_YEAR: ( en | fa )

  • static DAYS_IN_YEAR: ( en | fa )

  • static DAYS_IN_YEAR_LEAP: ( en | fa )

  • static WEEKS_IN_YEAR: ( en | fa )

  • static WEEKS_IN_YEAR_LEAP: ( en | fa )

  • toUTCTimeString(): ( en | fa )

  • weekCorrection(): ( en | fa )

  • static checkDate() || checkDate(): ( en | fa )

  • static checkWeek() || checkWeek(): ( en | fa )

  • static checkTime() || checkTime(): ( en | fa )

  • static checkTime12() || checkTime12(): ( en | fa )

  • clone(): ( en | fa )

  • dateCorrection(): ( en | fa )

  • timeCorrection(): ( en | fa )

Documents are being prepared

  • setWeek(): ( en | fa )
  • setDateOfDayOfYear(): ( en | fa )
  • setUTCDateOfDayOfYear(): ( en | fa )
  • getDayOfYear(): ( en | fa )
  • getUTCDayOfYear(): ( en | fa )
  • getDaysInYear(): ( en | fa )
  • getUTCDaysInYear(): ( en | fa )
  • getWeekOfYear(): ( en | fa )
  • getUTCWeekOfYear(): ( en | fa )
  • getWeeksInYear(): ( en | fa )
  • getUTCWeeksInYear(): ( en | fa )
  • getDaysInMonth(): ( en | fa )
  • getUTCDaysInMonth(): ( en | fa )
  • getDates(): ( en | fa )
  • getUTCDates(): ( en | fa )
  • toUTCDateString(): ( en | fa )
  • getUTCTime(): ( en | fa )
  • restTime(): ( en | fa )
  • restUTCTime(): ( en | fa )
  • getLanguage(): ( en | fa )
  • getFirstDayOfWeek(): ( en | fa )
  • getTimeServerDiff(): ( en | fa )
  • getTimeZone(): ( en | fa )
  • setTimeServerDiff(): ( en | fa )
  • setTimeZone(): ( en | fa )
  • setLanguage(): ( en | fa )
  • setFirstDayOfWeek(): ( en | fa )
  • setConfig(): ( en | fa )
  • instance(): ( en | fa )
  • getVersion(): ( en | fa )
  • NumbersTo(): ( en | fa )
  • getNthWeekdayOfMonth(): ( en | fa )
  • getFirstWeekdayOfMonth(): ( en | fa )
  • getLastWeekdayOfMonth(): ( en | fa )
  • WeekdayInMonth(): ( en | fa )
  • getWeekdayInMonth(): ( en | fa )
  • copy(): ( en | fa )
  • this(): ( en | fa )