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.6.0 to 2.7.0

24

build/index.esm.js

@@ -28,2 +28,4 @@ import defaultDayjs from 'dayjs';

monthAndYear: "MMMM YYYY",
weekday: "dddd",
weekdayShort: "ddd",
minutes: "mm",

@@ -37,2 +39,3 @@ hours12h: "hh",

fullDate: "ll",
fullDateWithWeekday: "dddd, LL",
fullDateTime: "lll",

@@ -44,3 +47,3 @@ fullDateTime12h: "ll hh:mm A",

keyboardDateTime12h: "L hh:mm A",
keyboardDateTime24h: "L HH:mm"
keyboardDateTime24h: "L HH:mm",
};

@@ -74,3 +77,3 @@ var DayjsUtils = /** @class */ (function () {

/* istanbul ignore next */
return _b = (_a = _this.rawDayJsInstance.Ls[_this.locale || "en"]) === null || _a === void 0 ? void 0 : _a.formats[token], (_b !== null && _b !== void 0 ? _b : token);
return (_b = (_a = _this.rawDayJsInstance.Ls[_this.locale || "en"]) === null || _a === void 0 ? void 0 : _a.formats[token]) !== null && _b !== void 0 ? _b : token;
}

@@ -87,3 +90,3 @@ return token;

}
return this.dayjs(value, format);
return this.dayjs(value, format, this.locale);
};

@@ -220,6 +223,3 @@ DayjsUtils.prototype.date = function (value) {

DayjsUtils.prototype.mergeDateAndTime = function (date, time) {
return date
.hour(time.hour())
.minute(time.minute())
.second(time.second());
return date.hour(time.hour()).minute(time.minute()).second(time.second());
};

@@ -240,10 +240,4 @@ DayjsUtils.prototype.getWeekdays = function () {

DayjsUtils.prototype.getWeekArray = function (date) {
var start = this.dayjs(date)
.clone()
.startOf("month")
.startOf("week");
var end = this.dayjs(date)
.clone()
.endOf("month")
.endOf("week");
var start = this.dayjs(date).clone().startOf("month").startOf("week");
var end = this.dayjs(date).clone().endOf("month").endOf("week");
var count = 0;

@@ -250,0 +244,0 @@ var current = start;

@@ -32,2 +32,4 @@ 'use strict';

monthAndYear: "MMMM YYYY",
weekday: "dddd",
weekdayShort: "ddd",
minutes: "mm",

@@ -41,2 +43,3 @@ hours12h: "hh",

fullDate: "ll",
fullDateWithWeekday: "dddd, LL",
fullDateTime: "lll",

@@ -48,3 +51,3 @@ fullDateTime12h: "ll hh:mm A",

keyboardDateTime12h: "L hh:mm A",
keyboardDateTime24h: "L HH:mm"
keyboardDateTime24h: "L HH:mm",
};

@@ -78,3 +81,3 @@ var DayjsUtils = /** @class */ (function () {

/* istanbul ignore next */
return _b = (_a = _this.rawDayJsInstance.Ls[_this.locale || "en"]) === null || _a === void 0 ? void 0 : _a.formats[token], (_b !== null && _b !== void 0 ? _b : token);
return (_b = (_a = _this.rawDayJsInstance.Ls[_this.locale || "en"]) === null || _a === void 0 ? void 0 : _a.formats[token]) !== null && _b !== void 0 ? _b : token;
}

@@ -91,3 +94,3 @@ return token;

}
return this.dayjs(value, format);
return this.dayjs(value, format, this.locale);
};

@@ -224,6 +227,3 @@ DayjsUtils.prototype.date = function (value) {

DayjsUtils.prototype.mergeDateAndTime = function (date, time) {
return date
.hour(time.hour())
.minute(time.minute())
.second(time.second());
return date.hour(time.hour()).minute(time.minute()).second(time.second());
};

@@ -244,10 +244,4 @@ DayjsUtils.prototype.getWeekdays = function () {

DayjsUtils.prototype.getWeekArray = function (date) {
var start = this.dayjs(date)
.clone()
.startOf("month")
.startOf("week");
var end = this.dayjs(date)
.clone()
.endOf("month")
.endOf("week");
var start = this.dayjs(date).clone().startOf("month").startOf("week");
var end = this.dayjs(date).clone().endOf("month").endOf("week");
var count = 0;

@@ -254,0 +248,0 @@ var current = start;

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

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

"dependencies": {
"@date-io/core": "^2.6.0"
"@date-io/core": "^2.7.0"
},

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

"license": "MIT",
"gitHead": "d6db25c9863530a6d5934a2f8b97b1f0162d967d"
"gitHead": "659d6c1858a313cff392aa27b03d1c5bcc1a3e29"
}

@@ -1,4 +0,4 @@

import typescript from 'typescript'
import { createRollupConfig } from '@date-io/core/dev-utils'
import typescript from "typescript";
import { createRollupConfig } from "@date-io/core/dev-utils";
export default createRollupConfig(typescript)
export default createRollupConfig(typescript);

@@ -34,2 +34,4 @@ import defaultDayjs from "dayjs";

monthAndYear: "MMMM YYYY",
weekday: "dddd",
weekdayShort: "ddd",
minutes: "mm",

@@ -43,2 +45,3 @@ hours12h: "hh",

fullDate: "ll",
fullDateWithWeekday: "dddd, LL",
fullDateTime: "lll",

@@ -50,3 +53,3 @@ fullDateTime12h: "ll hh:mm A",

keyboardDateTime12h: "L hh:mm A",
keyboardDateTime24h: "L HH:mm"
keyboardDateTime24h: "L HH:mm",
};

@@ -59,3 +62,3 @@

keyboardDateTime12h: "L LT",
keyboardDateTime24h: "L LT"
keyboardDateTime24h: "L LT",
};

@@ -91,3 +94,3 @@

.match(localFormattingTokens)
.map(token => {
.map((token) => {
var firstCharacter = token[0];

@@ -110,3 +113,3 @@ if (firstCharacter === "L") {

return this.dayjs(value, format);
return this.dayjs(value, format, this.locale);
}

@@ -287,6 +290,3 @@

public mergeDateAndTime(date: Dayjs, time: Dayjs) {
return date
.hour(time.hour())
.minute(time.minute())
.second(time.second());
return date.hour(time.hour()).minute(time.minute()).second(time.second());
}

@@ -296,3 +296,3 @@

const start = this.dayjs().startOf("week");
return [0, 1, 2, 3, 4, 5, 6].map(diff =>
return [0, 1, 2, 3, 4, 5, 6].map((diff) =>
this.formatByString(start.add(diff, "day"), "dd")

@@ -311,10 +311,4 @@ );

public getWeekArray(date: Dayjs) {
const start = this.dayjs(date)
.clone()
.startOf("month")
.startOf("week");
const end = this.dayjs(date)
.clone()
.endOf("month")
.endOf("week");
const start = this.dayjs(date).clone().startOf("month").startOf("week");
const end = this.dayjs(date).clone().endOf("month").endOf("week");

@@ -321,0 +315,0 @@ let count = 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