Huge News!Announcing our $40M Series B led by Abstract Ventures.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.9.0 to 2.9.2

4

build/dayjs-utils.d.ts
import defaultDayjs from "dayjs";
import { IUtils, DateIOFormats } from "@date-io/core/IUtils";
import { IUtils, DateIOFormats, Unit } from "@date-io/core/IUtils";
interface Opts {

@@ -26,3 +26,3 @@ locale?: string;

isNull(date: Dayjs): boolean;
getDiff(date: Dayjs, comparing: Dayjs, units?: any, float?: any): number;
getDiff(date: Dayjs, comparing: Dayjs, units?: Unit): number;
isAfter(date: Dayjs, value: Dayjs): boolean;

@@ -29,0 +29,0 @@ isBefore(date: Dayjs, value: Dayjs): boolean;

@@ -104,4 +104,4 @@ import defaultDayjs from 'dayjs';

};
DayjsUtils.prototype.getDiff = function (date, comparing, units, float) {
return date.diff(comparing, units, float);
DayjsUtils.prototype.getDiff = function (date, comparing, units) {
return date.diff(comparing, units);
};

@@ -108,0 +108,0 @@ DayjsUtils.prototype.isAfter = function (date, value) {

@@ -113,4 +113,4 @@ 'use strict';

};
DayjsUtils.prototype.getDiff = function (date, comparing, units, float) {
return date.diff(comparing, units, float);
DayjsUtils.prototype.getDiff = function (date, comparing, units) {
return date.diff(comparing, units);
};

@@ -117,0 +117,0 @@ DayjsUtils.prototype.isAfter = function (date, value) {

{
"name": "@date-io/dayjs",
"version": "2.9.0",
"version": "2.9.2",
"description": "Abstraction over common javascript date management libraries",

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

"dependencies": {
"@date-io/core": "^2.9.0"
"@date-io/core": "^2.9.2"
},

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

"license": "MIT",
"gitHead": "508a50423a17e207197c149814fe8087c5cef399"
"gitHead": "4712b8927e09e6bb5378436783e15d48e174584d"
}

@@ -1,6 +0,6 @@

import defaultDayjs from "dayjs";
import defaultDayjs, { QUnitType } from "dayjs";
import customParseFormatPlugin from "dayjs/plugin/customParseFormat";
import localizedFormatPlugin from "dayjs/plugin/localizedFormat";
import isBetweenPlugin from "dayjs/plugin/isBetween";
import { IUtils, DateIOFormats } from "@date-io/core/IUtils";
import { IUtils, DateIOFormats, Unit } from "@date-io/core/IUtils";

@@ -132,4 +132,4 @@ defaultDayjs.extend(customParseFormatPlugin);

public getDiff(date: Dayjs, comparing: Dayjs, units?: any, float?: any) {
return date.diff(comparing, units, float);
public getDiff(date: Dayjs, comparing: Dayjs, units?: Unit) {
return date.diff(comparing, units as QUnitType);
}

@@ -136,0 +136,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