Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jalali-moment

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jalali-moment - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

15

bower.json
{
"name": "jalali-moment",
"description": "Jalaali (Jalali, Persian, Khorshidi, Shamsi) calendar system plugin for moment.js.",
"description": "Jalali (Persian, Khorshidi, Shamsi) calendar system to use in javascript or typescript.",
"main": "jalali-moment.js",
"authors": [
"Mojtaba Zarei"
"Mojtaba Zarei (Fingerpich)"
],
"license": "MIT",
"keywords": [
"date",
"jalali",
"convert",
"miladi",
"shamsi",
"typescript",
"javascript",
"persian",
"khorshidi",
"shamsi",
"date",
"calendar",
"conversion",
"convert"
"time",
"calendar"
],

@@ -21,0 +22,0 @@ "homepage": "https://github.com/fingerpich/jalali-moment",

{
"name": "jalali-moment",
"version": "1.2.3",
"description": "Jalaali (Jalali, Persian, Khorshidi, Shamsi) calendar system plugin for moment.js.",
"version": "1.2.4",
"description": "Jalali (Persian, Khorshidi, Shamsi) calendar system to use in javascript or typescript.",
"author": {
"name": "Mojtaba Zarei",
"name": "Mojtaba Zarei (Fingerpich)",
"email": "zarei.bs@gmail.com"

@@ -11,12 +11,13 @@ },

"keywords": [
"date",
"jalali",
"convert",
"miladi",
"shamsi",
"typescript",
"javascript",
"persian",
"khorshidi",
"shamsi",
"date",
"calendar",
"conversion",
"convert"
"time",
"calendar"
],

@@ -23,0 +24,0 @@ "main": "jalali-moment.js",

@@ -56,3 +56,3 @@ # jalali-moment

transform(value: any, args?: any): any {
let MomentDate=moment(value);
let MomentDate = moment(value);
return MomentDate.format("jYYYY/jM/jD");

@@ -64,3 +64,3 @@ }

```HTML
<div>loadedData.date|jalali</div>
<div>{{ loadedData.date | jalali }}</div>
```

@@ -81,3 +81,3 @@

<script>
moment().format('jYYYY/jM/jD')
moment().format('jYYYY/jM/jD');
</script>

@@ -90,3 +90,3 @@ ```

<script>
moment().format('jYYYY/jM/jD')
moment().format('jYYYY/jM/jD');
</script>

@@ -104,16 +104,20 @@ ```

const m = moment('1367/11/4', 'jYYYY/jM/jD');
m.format('jYYYY/jM/jD [is] YYYY/M/D'); //1367/11/4 is 1989/1/24
m.jYear(); //1367
m.jMonth(); //10
m.jDate(); //4
m.jDayOfYear(); //310
m.jWeek(); //45
m.jWeekYear(); //1367
moment.jIsLeapYear(m.jYear()); //false
m.format('jYYYY/jM/jD [is] YYYY/M/D'); // 1367/11/4 is 1989/1/24
m.jYear(); // 1367
m.jMonth(); // 10
m.jDate(); // 4
m.jDayOfYear(); // 310
m.jWeek(); // 45
m.jWeekYear(); // 1367
moment.jIsLeapYear(m.jYear()); // false
moment('1392/6/3 16:40', 'jYYYY/jM/jD HH:mm').format('YYYY-M-D HH:mm:ss'); // 2013-8-25 16:40:00
moment('1392/6/3 16:40', 'jYYYY/jM/jD HH:mm')
.format('YYYY-M-D HH:mm:ss'); // 2013-8-25 16:40:00
moment('2013-8-25 16:40:00', 'YYYY-M-D HH:mm:ss').endOf('jMonth').format('jYYYY/jM/jD HH:mm:ss'); // 1392/6/31 23:59:59
moment('2013-8-25 16:40:00', 'YYYY-M-D HH:mm:ss')
.endOf('jMonth')
.format('jYYYY/jM/jD HH:mm:ss'); // 1392/6/31 23:59:59
moment('1981 5 17', 'YYYY jM D').format('YYYY/MM/DD'); // 1981/07/17
moment('1981 5 17', 'YYYY jM D')
.format('YYYY/MM/DD'); // 1981/07/17
```

@@ -120,0 +124,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc