@universe/util
Advanced tools
Comparing version 1.1.4 to 1.2.0
@@ -83,1 +83,3 @@ export declare const isNull: (v: unknown) => v is null; | ||
} | ||
export declare const localHourToUTC: (hour: number) => number; | ||
export declare const utcHourToLocal: (hour: number) => number; |
@@ -204,3 +204,23 @@ "use strict"; | ||
}); | ||
describe('Local Hours to UTC', function () { | ||
it('should convert local hours to utc while maintaining minutes elapsed', () => { | ||
assert.strictEqual(index_1.localHourToUTC(2.5), 10.5); | ||
}); | ||
it('should convert local hours to utc while wrapping for the 24th hour mark', () => { | ||
assert.strictEqual(index_1.localHourToUTC(22.5), 6.5); | ||
}); | ||
it('should convert local hours to utc', () => { | ||
assert.strictEqual(index_1.localHourToUTC(22), 6); | ||
}); | ||
it('should convert utc hours to local while maintaining minutes elapsed', () => { | ||
assert.strictEqual(index_1.utcHourToLocal(2.5), 18.5); | ||
}); | ||
it('should convert utc hours to local while wrapping for the 24th hour mark', () => { | ||
assert.strictEqual(index_1.utcHourToLocal(22.5), 14.5); | ||
}); | ||
it('should convert utc hours to local', () => { | ||
assert.strictEqual(index_1.utcHourToLocal(22), 14); | ||
}); | ||
}); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90ZXN0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEseUJBQXlCO0FBQ3pCLHlCQUF5QjtBQUN6Qiw2QkFBNkI7QUFFN0Isd0NBcUJzQjtBQUV0QixpQ0FBaUM7QUFFakMsUUFBUSxDQUFDLE9BQU8sRUFBRTtJQUNoQixRQUFRLENBQUMsaUJBQWlCLEVBQUU7UUFDMUIsRUFBRSxDQUFDLGNBQWMsRUFBRSxLQUFLO1lBQ3RCLE1BQU0sS0FBSyxHQUFHLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQztZQUN6QixJQUFJLE1BQU0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9PiB7XG4gICAgICBhc3NlcnQuc3RyaWN0RXF1YWwobG9jYWxIb3VyVG9VVEMoMjIuNSksIDYuNSk7XG4gICAgfSk7XG5cbiAgICBpdCgnc2hvdWxkIGNvbnZlcnQgbG9jYWwgaG91cnMgdG8gdXRjJywgKCkgPT4ge1xuICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKGxvY2FsSG91clRvVVRDKDIyKSwgNik7XG4gICAgfSk7XG5cbiAgICBpdCgnc2hvdWxkIGNvbnZlcnQgdXRjIGhvdXJzIHRvIGxvY2FsIHdoaWxlIG1haW50YWluaW5nIG1pbnV0ZXMgZWxhcHNlZCcsICgpID0+IHtcbiAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCh1dGNIb3VyVG9Mb2NhbCgyLjUpLCAxOC41KTtcbiAgICB9KTtcblxuICAgIGl0KCdzaG91bGQgY29udmVydCB1dGMgaG91cnMgdG8gbG9jYWwgd2hpbGUgd3JhcHBpbmcgZm9yIHRoZSAyNHRoIGhvdXIgbWFyaycsICgpID0+IHtcbiAgICAgIGFzc2VydC5zdHJpY3RFcXVhbCh1dGNIb3VyVG9Mb2NhbCgyMi41KSwgMTQuNSk7XG4gICAgfSk7XG5cbiAgICBpdCgnc2hvdWxkIGNvbnZlcnQgdXRjIGhvdXJzIHRvIGxvY2FsJywgKCkgPT4ge1xuICAgICAgYXNzZXJ0LnN0cmljdEVxdWFsKHV0Y0hvdXJUb0xvY2FsKDIyKSwgMTQpO1xuICAgIH0pO1xuICB9KTtcbn0pO1xuIl19 |
{ | ||
"name": "@universe/util", | ||
"version": "1.1.4", | ||
"version": "1.2.0", | ||
"main": "dist/src/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Universe development utilities.", |
@@ -442,11 +442,38 @@ /* global MessageChannel */ | ||
public reject!: (err: Error) => void; | ||
constructor() { | ||
let res!: (value: T | PromiseLike<T>) => void; | ||
let rej!: (err: Error) => void; | ||
constructor() { | ||
let res!: (value: T | PromiseLike<T>) => void; | ||
let rej!: (err: Error) => void; | ||
super((resolve, reject) => { res = resolve; rej = reject; }); | ||
this.resolve = res; | ||
this.reject = rej; | ||
this.reject = rej; | ||
} | ||
static get [Symbol.species](): typeof Promise { return Promise; } | ||
get [Symbol.toStringTag](): string { return 'Deferred'; } | ||
} | ||
export const localHourToUTC = (hour: number): number => { | ||
// Generate a new date in the local timezone that's set to the input hour. | ||
const now = new Date(); | ||
const date = new Date(now.getFullYear(), now.getMonth(), now.getDate(), Math.trunc(hour)); | ||
const utcHour = parseInt(Intl.DateTimeFormat( | ||
Intl.DateTimeFormat().resolvedOptions().locale, | ||
{ hour: 'numeric', hour12: false, timeZone: 'UTC' }, | ||
).format(date), 10); | ||
// Return UTC hour plus percentage of minutes elapsed. | ||
return utcHour + Math.round((hour % 1) * 100) / 100; | ||
}; | ||
export const utcHourToLocal = (hour: number): number => { | ||
// Generate a new date in UTC that's set to the input hour. | ||
const now = new Date(); | ||
const date = Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), Math.trunc(hour)); | ||
const localHour = parseInt(Intl.DateTimeFormat( | ||
Intl.DateTimeFormat().resolvedOptions().locale, | ||
{ hour: 'numeric', hour12: false, timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone }, | ||
).format(date), 10); | ||
// Return local hour plus percent age of minutes elapsed. | ||
return localHour + Math.round((hour % 1) * 100) / 100; | ||
}; |
@@ -17,2 +17,4 @@ /* global describe, it */ | ||
posixToDate, | ||
localHourToUTC, | ||
utcHourToLocal, | ||
toLowerCase, | ||
@@ -243,2 +245,28 @@ toUpperCase, | ||
}); | ||
describe('Local Hours to UTC', function() { | ||
it('should convert local hours to utc while maintaining minutes elapsed', () => { | ||
assert.strictEqual(localHourToUTC(2.5), 10.5); | ||
}); | ||
it('should convert local hours to utc while wrapping for the 24th hour mark', () => { | ||
assert.strictEqual(localHourToUTC(22.5), 6.5); | ||
}); | ||
it('should convert local hours to utc', () => { | ||
assert.strictEqual(localHourToUTC(22), 6); | ||
}); | ||
it('should convert utc hours to local while maintaining minutes elapsed', () => { | ||
assert.strictEqual(utcHourToLocal(2.5), 18.5); | ||
}); | ||
it('should convert utc hours to local while wrapping for the 24th hour mark', () => { | ||
assert.strictEqual(utcHourToLocal(22.5), 14.5); | ||
}); | ||
it('should convert utc hours to local', () => { | ||
assert.strictEqual(utcHourToLocal(22), 14); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
477721
1500
1