Socket
Socket
Sign inDemoInstall

js-joda

Package Overview
Dependencies
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-joda - npm Package Compare versions

Comparing version 1.1.12 to 1.1.13

src/zone/ZoneRulesProvider.js

17

CHANGELOG.md
Changelog
=========
### 1.1.13 (next)
### 1.1.14 (next)
...
### 1.1.13
#### Add ZoneRulesProvider stub
Add the ZoneRulesProvider. This should be the last step to enable js-joda for an external js-joda-timezone plugin.
#### Provide a way to extend js-joda
[Implement a use function](https://github.com/js-joda/js-joda/pull/100#issuecomment-252425196)
### Bugfixes
* Fix SystemDefaultZoneRules transition (fix a bug in convert and LocalDate.startOfDay)
### 1.1.12

@@ -9,0 +22,0 @@

@@ -252,2 +252,3 @@ js-joda Cheat sheet

// Warn! hashCode is equal if in insances are equal, but might be equal for unequal instances as well
d1.hashCode(); // 4129560

@@ -469,2 +470,3 @@ d2.hashCode(); // 4129562

// Warn! hashCode is equal if in insances are equal, but might be equal for unequal instances as well
t1.hashCode(); // 916974646

@@ -703,2 +705,3 @@ t2.hashCode(); // -1743180648

// Warn! hashCode is equal if in insances are equal, but might be equal for unequal instances as well
dt1.hashCode(); // -2036645668

@@ -705,0 +708,0 @@ dt2.hashCode(); // 1459191821

4

dist/js-joda.d.ts

@@ -440,3 +440,3 @@ declare namespace JSJoda {

plus(amount: TemporalAmount): LocalTime
plus(amountToAdd: number, unit: ChronoUnit): LocalTime
plus(amountToAdd: number, unit: TemporalUnit): LocalTime

@@ -470,3 +470,3 @@ plusHours(hoursToAdd: number): LocalTime

with(adjuster: TemporalAdjuster): LocalTime
with(field: ChronoField, newValue: number): LocalTime
with(field: TemporalField, newValue: number): LocalTime

@@ -473,0 +473,0 @@ withHour(hour: number): LocalTime

{
"name": "js-joda",
"version": "1.1.12",
"version": "1.1.13",
"description": "a date and time library for javascript",

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

"test-ci": "npm run build-dist && npm run test && npm run test-browser -- --browsers \"Firefox,PhantomJS\" && npm run test-ts-definitions && npm run build-esdoc && npm run test-coverage",
"test-ts-definitions": "tsc --noImplicitAny --pretty test/typescript_defintions/js-joda-tests.ts",
"test-ts-definitions": "tsc --noImplicitAny --noEmit --pretty test/typescript_defintions/js-joda-tests.ts",
"build-esdoc": "./node_modules/.bin/esdoc -c esdoc.json",

@@ -37,14 +37,14 @@ "build-dist-es5": "./node_modules/.bin/babel src -d build/es5",

"devDependencies": {
"babel-cli": "^6.14.0",
"babel-core": "^6.14.0",
"babel-loader": "^6.2.5",
"babel-plugin-istanbul": "^2.0.1",
"babel-preset-es2015": "^6.14.0",
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-loader": "^6.2.7",
"babel-plugin-istanbul": "^2.0.3",
"babel-preset-es2015": "^6.18.0",
"chai": "^3.5.0",
"coveralls": "^2.11.12",
"coveralls": "^2.11.14",
"esdoc": "^0.4.8",
"eslint": "^3.6.0",
"eslint-config-standard": "^6.1.0",
"eslint-plugin-promise": "^2.0.1",
"eslint-plugin-standard": "^2.0.0",
"eslint": "^3.9.1",
"eslint-config-standard": "^6.2.1",
"eslint-plugin-promise": "^3.3.0",
"eslint-plugin-standard": "^2.0.1",
"karma": "^1.3.0",

@@ -59,9 +59,9 @@ "karma-chai-plugins": "^0.8.0",

"markdown-toc": "^0.13.0",
"mocha": "^3.0.2",
"nyc": "^8.1.0",
"phantomjs-prebuilt": "^2.1.12",
"typescript": "^2.0.3",
"webpack": "^1.13.2"
"mocha": "^3.1.2",
"nyc": "^8.3.2",
"phantomjs-prebuilt": "^2.1.13",
"typescript": "^2.0.6",
"webpack": "^1.13.3"
},
"license": "BSD-3-Clause"
}

@@ -22,2 +22,4 @@ /**

export { ZoneId } from './ZoneId';
export { ZoneRegion } from './ZoneRegion';
export { ZoneRulesProvider } from './zone/ZoneRulesProvider';

@@ -37,2 +39,19 @@ export {convert} from './convert';

import './_init';
import './_init';
const used = [];
/**
* use
*
* Provides a way to extend the internals of js-joda
*
* @param {function} fn - function to extend js-joda public api
* @returns {this} for chaining
*/
export function use(fn) {
if (!~used.indexOf(fn)) {
fn(exports);
used.push(fn);
}
return exports;
}

@@ -21,2 +21,3 @@ /**

import {Temporal} from './temporal/Temporal';
import {TemporalField} from './temporal/TemporalField';
import {TemporalQueries} from './temporal/TemporalQueries';

@@ -612,3 +613,3 @@ import {createTemporalQuery} from './temporal/TemporalQuery';

*
* @param {!ChronoField} field - the field to set in the result, not null
* @param {!TemporalField} field - the field to set in the result, not null
* @param {number} newValue - the new value of the field in the result

@@ -621,2 +622,3 @@ * @return {LocalTime} a {@link LocalTime} based on this with the specified field set, not null

requireNonNull(field, 'field');
requireInstance(field, TemporalField, 'field');
if (field instanceof ChronoField) {

@@ -800,3 +802,3 @@ field.checkValidValue(newValue);

* @param {number} amountToAdd - the amount of the unit to add to the result, may be negative
* @param {ChronoUnit} unit - the unit of the period to add, not null
* @param {TemporalUnit} unit - the unit of the period to add, not null
* @return {LocalTime} a {@link LocalTime} based on this time with the specified period added, not null

@@ -1150,2 +1152,4 @@ * @throws {DateTimeException} if the unit cannot be added to this type

until(endExclusive, unit) {
requireNonNull(endExclusive, 'endExclusive');
requireNonNull(unit, 'unit');
var end = LocalTime.from(endExclusive);

@@ -1152,0 +1156,0 @@ if (unit instanceof ChronoUnit) {

@@ -70,3 +70,3 @@ /*

transition(){
this._throwNotSupported();
return null;
}

@@ -73,0 +73,0 @@

@@ -17,2 +17,3 @@ /*

import {SystemDefaultZoneId} from './zone/SystemDefaultZoneId';
import {ZoneRulesProvider} from './zone/ZoneRulesProvider';

@@ -38,2 +39,18 @@ /**

/**
* Gets the set of available zone IDs.
* <p>
* This set includes the string form of all available region-based IDs.
* Offset-based zone IDs are not included in the returned set.
* The ID can be passed to {@link #of(String)} to create a {@code ZoneId}.
* <p>
* The set of zone IDs can increase over time, although in a typical application
* the set of IDs is fixed. Each call to this method is thread-safe.
*
* @return {string[]} a modifiable copy of the set of zone IDs, not null
*/
static getAvailableZoneIds() {
return ZoneRulesProvider.getAvailableZoneIds();
}
/**
* Obtains an instance of {@code ZoneId} from an ID ensuring that the

@@ -89,3 +106,3 @@ * ID is valid and available for use.

}
if (zoneId === 'UTC' || zoneId === 'GMT' || zoneId === 'UT') {
if (zoneId === 'UTC' || zoneId === 'GMT' || zoneId === 'GMT0' || zoneId === 'UT') {
return new ZoneRegion(zoneId, ZoneOffset.UTC.rules());

@@ -112,3 +129,3 @@ }

}
return ZoneRegion.ofId(zoneId, true);
return ZoneRegion.ofId(zoneId);
}

@@ -179,2 +196,3 @@

ZoneId.systemDefault = ZoneIdFactory.systemDefault;
ZoneId.getAvailableZoneIds = ZoneIdFactory.getAvailableZoneIds;
ZoneId.of = ZoneIdFactory.of;

@@ -181,0 +199,0 @@ ZoneId.ofOffset = ZoneIdFactory.ofOffset;

@@ -7,6 +7,5 @@ /*

import {DateTimeException} from './errors';
import {ZoneId} from './ZoneId';
import {ZoneOffset} from './ZoneOffset';
import {ZoneRulesProvider} from './zone/ZoneRulesProvider';

@@ -38,8 +37,4 @@ /**

static ofId(zoneId){
// special case as removed from data file
if (zoneId === 'GMT0') {
var rules = ZoneOffset.UTC.rules();
return new ZoneRegion(zoneId, rules);
}
throw new DateTimeException('ZoneRegion.ofId() is not yet implemented');
let rules = ZoneRulesProvider.getRules(zoneId);
return new ZoneRegion(zoneId, rules);
}

@@ -46,0 +41,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

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