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 3.2.4 to 3.2.5

index.html

3

jalali-moment.js

@@ -5,2 +5,3 @@

var moment = require("moment");
require("moment/locale/fa");

@@ -1307,2 +1308,2 @@ /************************************

};
}
}
{
"name": "jalali-moment",
"version": "3.2.4",
"version": "3.2.5",
"description": "Manipulate and convert Jalali and Gregorian date easily",

@@ -5,0 +5,0 @@ "author": {

@@ -1080,2 +1080,51 @@

});
describe("getting week fa locale", function () {
moment.locale("en");
var now = moment();
now.locale("fa");
it("week with fa locale", function () {
now.week().should.be.equal(now.jWeek());
});
it("week year with fa locale", function () {
now.weekYear().should.be.equal(now.jWeekYear());
});
});
describe("getting from now with fa locale", function () {
moment.locale("fa");
it("just now", function () {
var now = moment();
now.locale("fa");
now.fromNow().should.be.equal("چند ثانیه پیش");
});
it("10 seconds ago", function () {
var now = moment();
now.locale("fa");
now.subtract(10, "s");
now.fromNow().should.be.equal("چند ثانیه پیش");
});
it("100 seconds ago", function () {
var now = moment();
now.locale("fa");
now.subtract(100, "s");
now.fromNow().should.be.equal("2 دقیقه پیش");
});
it("5 days ago", function () {
var now = moment();
now.locale("fa");
now.subtract(5, "d");
now.fromNow().should.be.equal("5 روز پیش");
});
it("1 month ago", function () {
var now = moment();
now.locale("fa");
now.subtract(1, "months");
now.fromNow().should.be.equal("1 ماه پیش");
});
it("3 years ago", function () {
var now = moment();
now.locale("fa");
now.subtract(3, "year");
now.fromNow().should.be.equal("3 سال پیش");
});
});
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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