Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tscommons-core

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tscommons-core - npm Package Compare versions

Comparing version 1.30.0 to 1.31.0

1

dist/helpers/commons-date.d.ts

@@ -51,2 +51,3 @@ import { TDateRange } from '../types/tdate-range';

static fillEmptyDays(timestamps: Date[]): Date[];
static getDateRangeFromDateArray(dates: Readonly<(Readonly<Date>)[]>): TDateRange;
static phpDate(format: string, date?: Date, iso?: boolean): string;

@@ -53,0 +54,0 @@ static getDeltaHours(range: TDateRange, inclusive?: boolean): number;

@@ -415,2 +415,18 @@ "use strict";

}
static getDateRangeFromDateArray(dates) {
if (dates.length === 0)
throw new Error('No dates to derive range from');
const min = new Date(dates[0].getTime());
const max = new Date(dates[0].getTime());
for (const date of dates.slice(1)) {
if (date.getTime() < min.getTime())
min.setTime(date.getTime());
if (date.getTime() > max.getTime())
max.setTime(date.getTime());
}
return {
from: min,
to: max
};
}
static phpDate(format, date, iso = false) {

@@ -417,0 +433,0 @@ if (!date)

2

package.json
{
"name": "tscommons-core",
"version": "1.30.0",
"version": "1.31.0",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

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