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

@js-joda/core

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@js-joda/core - npm Package Compare versions

Comparing version 5.1.0 to 5.2.0

dist/js-joda.cjs.js

4

CHANGELOG.md
Changelog
=========
### next (upcoming)
### Later version
For later versions check the global [`CHANGELOG.md`](../../CHANGELOG.md) file in the root folder.
### 5.1.0

@@ -7,0 +9,0 @@

{
"name": "@js-joda/core",
"version": "5.1.0",
"version": "5.2.0",
"description": "a date and time library for javascript",

@@ -51,3 +51,3 @@ "repository": {

},
"gitHead": "dda0bbb3894919782d859060bbabbaa3859775a8"
"gitHead": "d07153c38a3d0b2b29b8185e3daaac69c624d4a9"
}

@@ -176,2 +176,16 @@ /**

/**
* Obtains an instance of {@link Instant} using microseconds from the
* epoch of 1970-01-01T00:00:00Z.
*
* @param {number} epochMicro - the number of microseconds from 1970-01-01T00:00:00Z
* @return {Instant} an instant, not null
* @throws DateTimeException if the instant exceeds the maximum or minimum instant
*/
static ofEpochMicro(epochMicro) {
const secs = MathUtil.floorDiv(epochMicro, 1000000);
const mos = MathUtil.floorMod(epochMicro, 1000000);
return Instant._create(secs, mos * 1000);
}
/**
* Obtains an instance of {@link Instant} from a temporal object.

@@ -529,3 +543,3 @@ *

case ChronoUnit.NANOS: return this.plusNanos(amountToAdd);
case ChronoUnit.MICROS: return this._plus(MathUtil.intDiv(amountToAdd, 1000000), MathUtil.intMod(amountToAdd, 1000000) * 1000);
case ChronoUnit.MICROS: return this.plusMicros(amountToAdd);
case ChronoUnit.MILLIS: return this.plusMillis(amountToAdd);

@@ -584,2 +598,15 @@ case ChronoUnit.SECONDS: return this.plusSeconds(amountToAdd);

/**
* Returns a copy of this instant with the specified duration in microseconds added.
*
* This instance is immutable and unaffected by this method call.
*
* @param {number} microsToAdd - the microseconds to add, positive or negative
* @return {Instant} an {@link Instant} based on this instant with the specified microseconds added, not null
* @throws DateTimeException if the result exceeds the maximum or minimum instant
*/
plusMicros(microsToAdd) {
return this._plus(MathUtil.intDiv(microsToAdd, 1000000), MathUtil.intMod(microsToAdd, 1000000) * 1000);
}
/**
* Returns a copy of this instant with the specified duration added.

@@ -658,2 +685,16 @@ *

/**
* Returns a copy of this instant with the specified duration in microseconds subtracted.
*
* This instance is immutable and unaffected by this method call.
*
* @param {number} microsToSubtract the microseconds to subtract, positive or negative
* @return {Instant} an {@link Instant} based on this instant with the specified microseconds subtracted, not null
* @throws DateTimeException if the result exceeds the maximum or minimum instant
* @throws ArithmeticException if numeric overflow occurs
*/
minusMicros(microsToSubtract) {
return this.plusMicros(-1 * microsToSubtract);
}
//-------------------------------------------------------------------------

@@ -660,0 +701,0 @@ /**

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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