shdate
v2.3.17
Published
Date and Time Related Extensions SH{Shamsi Hijri, Solar Hijri, Iranian Hijri}
Downloads
137
Maintainers
Readme
به نام خدا
تاریخ و زمان گاهشماری هجری شمسی (هجری خورشیدی, جلالی)
In the name of Allah, the Beneficent, the Merciful.
Date and Time - SH (Solar Hijri, Shamsi Hijri, Iranian Hijri)
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 yourpackage.json
or change your file extension from.js
to.mjs
.
Standard built-in objects
- SHDate
Constructor
- SHDate() constructor
Methods
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 )