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.25.0 to 1.25.1

2

dist/helpers/commons-date.d.ts

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

static getPastTime(date: Date, time: Date): Date;
static buildClosestDateFromTime(original: Date, hour: number, minute: number, second?: number, millisecond?: number): Date;
static buildClosestDateFromTime(original: Date, hour: number, minute: number, second?: number, millisecond?: number, magic12Hours?: boolean): Date;
static fillEmptyMinutes(timestamps: Date[]): Date[];

@@ -50,0 +50,0 @@ static fillEmptyHours(timestamps: Date[]): Date[];

@@ -314,3 +314,13 @@ "use strict";

}
static buildClosestDateFromTime(original, hour, minute, second, millisecond) {
static buildClosestDateFromTime(original, hour, minute, second, millisecond, magic12Hours = false) {
if (magic12Hours && hour < 13) {
const magicHour = (hour + 12) % 24;
const normalResult = CommonsDate.buildClosestDateFromTime(original, hour, minute, second, millisecond);
const magicResult = CommonsDate.buildClosestDateFromTime(original, magicHour, minute, second, millisecond);
const normalDelta = Math.abs(original.getTime() - normalResult.getTime());
const magicDelta = Math.abs(original.getTime() - magicResult.getTime());
if (magicDelta < normalDelta)
return magicResult;
return normalResult;
}
const clone = new Date(original.getTime());

@@ -317,0 +327,0 @@ if (hour !== undefined)

{
"name": "tscommons-core",
"version": "1.25.0",
"version": "1.25.1",
"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