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

@amaui/date

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amaui/date - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

13

endOf.js

@@ -7,2 +7,13 @@ "use strict";

const AmauiDate_1 = __importDefault(require("./AmauiDate"));
// circular dependency issue fix
function add(value, unit, amauiDate_ = AmauiDate_1.default.amauiDate) {
if (amauiDate_ &&
amauiDate_.valid) {
const amauiDate = new AmauiDate_1.default(amauiDate_);
switch (unit) {
case 'day':
return new AmauiDate_1.default(amauiDate.value.setDate(amauiDate.day + value));
}
}
}
function endOf(amauiDate_ = AmauiDate_1.default.amauiDate, unit = 'day') {

@@ -21,2 +32,4 @@ if (amauiDate_ &&

return new AmauiDate_1.default(amauiDate.value.setHours(23, 59, 59, 999));
case 'week':
return endOf(add(7 - amauiDate.dayWeek, 'day'), 'day');
case 'month':

@@ -23,0 +36,0 @@ return new AmauiDate_1.default(new Date(amauiDate.value.setMonth(amauiDate.month, 0)).setHours(23, 59, 59, 999));

19

esm/endOf.js

@@ -1,2 +0,16 @@

import AmauiDate from './AmauiDate';
import AmauiDate from './AmauiDate'; // circular dependency issue fix
function add(value, unit) {
let amauiDate_ = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : AmauiDate.amauiDate;
if (amauiDate_ && amauiDate_.valid) {
const amauiDate = new AmauiDate(amauiDate_);
switch (unit) {
case 'day':
return new AmauiDate(amauiDate.value.setDate(amauiDate.day + value));
}
}
}
export default function endOf() {

@@ -22,2 +36,5 @@ let amauiDate_ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : AmauiDate.amauiDate;

case 'week':
return endOf(add(7 - amauiDate.dayWeek, 'day'), 'day');
case 'month':

@@ -24,0 +41,0 @@ return new AmauiDate(new Date(amauiDate.value.setMonth(amauiDate.month, 0)).setHours(23, 59, 59, 999));

2

esm/index.js

@@ -1,2 +0,2 @@

/** @license AmauiDate v1.1.2
/** @license AmauiDate v1.1.3
*

@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the

import AmauiDate from './AmauiDate';
import remove from './remove';
export default function startOf() {

@@ -22,2 +23,5 @@ let amauiDate_ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : AmauiDate.amauiDate;

case 'week':
return startOf(remove(amauiDate.dayWeek - 1, 'day'), 'day');
case 'month':

@@ -24,0 +28,0 @@ return new AmauiDate(new Date(amauiDate.value.setDate(1)).setHours(0, 0, 0, 0));

{
"name": "@amaui/date",
"version": "1.1.2",
"version": "1.1.3",
"description": "Time and date utils library",

@@ -5,0 +5,0 @@ "repository": "https://github.com/amaui-org/amaui-date.git",

@@ -7,2 +7,3 @@ "use strict";

const AmauiDate_1 = __importDefault(require("./AmauiDate"));
const remove_1 = __importDefault(require("./remove"));
function startOf(amauiDate_ = AmauiDate_1.default.amauiDate, unit = 'day') {

@@ -21,2 +22,4 @@ if (amauiDate_ &&

return new AmauiDate_1.default(amauiDate.value.setHours(0, 0, 0, 0));
case 'week':
return startOf((0, remove_1.default)(amauiDate.dayWeek - 1, 'day'), 'day');
case 'month':

@@ -23,0 +26,0 @@ return new AmauiDate_1.default(new Date(amauiDate.value.setDate(1)).setHours(0, 0, 0, 0));

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

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

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