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.4 to 1.1.5

5

AmauiDate.d.ts

@@ -11,3 +11,3 @@ interface IOptionsOverrides {

}
export declare type TTimeUnits = 'millisecond' | 'milliseconds' | 'second' | 'minute' | 'minutes' | 'hour' | 'hours' | 'day' | 'days' | 'dayWeek' | 'dayYear' | 'week' | 'weeks' | 'month' | 'year';
export declare type TTimeUnits = 'millisecond' | 'milliseconds' | 'second' | 'minute' | 'minutes' | 'hour' | 'hours' | 'day' | 'days' | 'dayWeek' | 'dayYear' | 'week' | 'weeks' | 'month' | 'months' | 'year';
export declare type TIsQuery = 'before' | 'after' | 'same' | 'between' | 'before or same' | 'after or same' | 'leap-year' | 'leap-month';

@@ -37,2 +37,3 @@ export declare const units: string[];

month: number;
months: number;
year: number;

@@ -50,3 +51,3 @@ static get utc(): AmauiDate;

private weekValue;
get months(): string[];
get monthsNames(): string[];
get monthsAbr(): string[];

@@ -53,0 +54,0 @@ get daysWeek(): string[];

@@ -9,3 +9,3 @@ "use strict";

const optionsDefault = {};
exports.units = ['millisecond', 'milliseconds', 'second', 'minute', 'minutes', 'hour', 'hours', 'day', 'days', 'dayWeek', 'dayYear', 'week', 'weeks', 'month', 'year'];
exports.units = ['millisecond', 'milliseconds', 'second', 'minute', 'minutes', 'hour', 'hours', 'day', 'days', 'dayWeek', 'dayYear', 'week', 'weeks', 'month', 'months', 'year'];
exports.months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];

@@ -51,2 +51,3 @@ exports.monthsAbr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];

this.dayYear = Math.floor((this.milliseconds - Number(new Date(this.year, 0, 0))) / 1000 / 60 / 60 / 24);
this.months = ((this.year - 1970) * 12) - (12 - this.month);
this.weekValue();

@@ -63,3 +64,3 @@ }

}
get months() {
get monthsNames() {
var _a;

@@ -66,0 +67,0 @@ return ((_a = this.options.overrides) === null || _a === void 0 ? void 0 : _a.months) || exports.months;

7

esm/AmauiDate.js
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import merge from '@amaui/utils/merge';
const optionsDefault = {};
export const units = ['millisecond', 'milliseconds', 'second', 'minute', 'minutes', 'hour', 'hours', 'day', 'days', 'dayWeek', 'dayYear', 'week', 'weeks', 'month', 'year'];
export const units = ['millisecond', 'milliseconds', 'second', 'minute', 'minutes', 'hour', 'hours', 'day', 'days', 'dayWeek', 'dayYear', 'week', 'weeks', 'month', 'months', 'year'];
export const months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];

@@ -80,2 +80,4 @@ export const monthsAbr = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];

_defineProperty(this, "months", void 0);
_defineProperty(this, "year", void 0);

@@ -107,2 +109,3 @@

this.dayYear = Math.floor((this.milliseconds - Number(new Date(this.year, 0, 0))) / 1000 / 60 / 60 / 24);
this.months = (this.year - 1970) * 12 - (12 - this.month);
this.weekValue();

@@ -121,3 +124,3 @@ }

get months() {
get monthsNames() {
var _this$options$overrid;

@@ -124,0 +127,0 @@

@@ -79,3 +79,3 @@ import getLeadingZerosNumber from '@amaui/utils/getLeadingZerosNumber';

abr: 'MMMM',
value: amauiDate.months[amauiDate.month - 1 < 0 ? amauiDate.months.length - 1 : amauiDate.month - 1]
value: amauiDate.monthsNames[amauiDate.month - 1 < 0 ? amauiDate.monthsNames.length - 1 : amauiDate.month - 1]
}, {

@@ -82,0 +82,0 @@ abr: 'MMM',

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

/** @license AmauiDate v1.1.4
/** @license AmauiDate v1.1.5
*

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

@@ -38,3 +38,3 @@ "use strict";

{ abr: 'Mo', value: (0, getOrdinalNumber_1.default)(amauiDate.month) },
{ abr: 'MMMM', value: amauiDate.months[amauiDate.month - 1 < 0 ? amauiDate.months.length - 1 : amauiDate.month - 1] },
{ abr: 'MMMM', value: amauiDate.monthsNames[amauiDate.month - 1 < 0 ? amauiDate.monthsNames.length - 1 : amauiDate.month - 1] },
{ abr: 'MMM', value: amauiDate.monthsAbr[amauiDate.month - 1 < 0 ? amauiDate.monthsAbr.length - 1 : amauiDate.month - 1] },

@@ -41,0 +41,0 @@ { abr: 'MM', value: (0, getLeadingZerosNumber_1.default)(amauiDate.month) },

{
"name": "@amaui/date",
"version": "1.1.4",
"version": "1.1.5",
"description": "Time and date utils library",

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

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