New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@date-io/dayjs

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@date-io/dayjs - npm Package Compare versions

Comparing version 2.10.0 to 2.10.1

4

build/dayjs-utils.d.ts

@@ -39,3 +39,7 @@ import defaultDayjs from "dayjs";

getHours(date: Dayjs): number;
addSeconds(date: Dayjs, count: number): defaultDayjs.Dayjs;
addMinutes(date: Dayjs, count: number): defaultDayjs.Dayjs;
addHours(date: Dayjs, count: number): defaultDayjs.Dayjs;
addDays(date: Dayjs, count: number): defaultDayjs.Dayjs;
addWeeks(date: Dayjs, count: number): defaultDayjs.Dayjs;
addMonths(date: Dayjs, count: number): defaultDayjs.Dayjs;

@@ -42,0 +46,0 @@ setMonth(date: Dayjs, count: number): defaultDayjs.Dayjs;

@@ -143,5 +143,21 @@ import defaultDayjs from 'dayjs';

};
DayjsUtils.prototype.addSeconds = function (date, count) {
return count < 0
? date.subtract(Math.abs(count), "second")
: date.add(count, "second");
};
DayjsUtils.prototype.addMinutes = function (date, count) {
return count < 0
? date.subtract(Math.abs(count), "minute")
: date.add(count, "minute");
};
DayjsUtils.prototype.addHours = function (date, count) {
return count < 0 ? date.subtract(Math.abs(count), "hour") : date.add(count, "hour");
};
DayjsUtils.prototype.addDays = function (date, count) {
return count < 0 ? date.subtract(Math.abs(count), "day") : date.add(count, "day");
};
DayjsUtils.prototype.addWeeks = function (date, count) {
return count < 0 ? date.subtract(Math.abs(count), "week") : date.add(count, "week");
};
DayjsUtils.prototype.addMonths = function (date, count) {

@@ -148,0 +164,0 @@ return count < 0 ? date.subtract(Math.abs(count), "month") : date.add(count, "month");

@@ -152,5 +152,21 @@ 'use strict';

};
DayjsUtils.prototype.addSeconds = function (date, count) {
return count < 0
? date.subtract(Math.abs(count), "second")
: date.add(count, "second");
};
DayjsUtils.prototype.addMinutes = function (date, count) {
return count < 0
? date.subtract(Math.abs(count), "minute")
: date.add(count, "minute");
};
DayjsUtils.prototype.addHours = function (date, count) {
return count < 0 ? date.subtract(Math.abs(count), "hour") : date.add(count, "hour");
};
DayjsUtils.prototype.addDays = function (date, count) {
return count < 0 ? date.subtract(Math.abs(count), "day") : date.add(count, "day");
};
DayjsUtils.prototype.addWeeks = function (date, count) {
return count < 0 ? date.subtract(Math.abs(count), "week") : date.add(count, "week");
};
DayjsUtils.prototype.addMonths = function (date, count) {

@@ -157,0 +173,0 @@ return count < 0 ? date.subtract(Math.abs(count), "month") : date.add(count, "month");

6

package.json
{
"name": "@date-io/dayjs",
"version": "2.10.0",
"version": "2.10.1",
"description": "Abstraction over common javascript date management libraries",

@@ -12,3 +12,3 @@ "main": "build/index.js",

"dependencies": {
"@date-io/core": "^2.10.0"
"@date-io/core": "^2.10.1"
},

@@ -45,3 +45,3 @@ "devDependencies": {

"license": "MIT",
"gitHead": "3b596e88e257510621c56883233ebc7676161e9f"
"gitHead": "2ae1fe887c558bfb958fc74986a3da061aa15b40"
}
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