Skip to content

Latest commit

 

History

History
265 lines (176 loc) · 17.8 KB

README.md

File metadata and controls

265 lines (176 loc) · 17.8 KB

به نام خدا

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

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 )