@platform/util.value
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -19,3 +19,3 @@ "use strict"; | ||
}, | ||
get time() { | ||
get timestamp() { | ||
return toTimestamp(date); | ||
@@ -22,0 +22,0 @@ }, |
@@ -29,4 +29,4 @@ "use strict"; | ||
var utc = _1.time.utc(); | ||
chai_1.expect(utc.date).to.eql(_1.time.fromTimestamp(utc.time)); | ||
chai_1.expect(utc.time).to.eql(_1.time.toTimestamp(utc.date)); | ||
chai_1.expect(utc.date).to.eql(_1.time.fromTimestamp(utc.timestamp)); | ||
chai_1.expect(utc.timestamp).to.eql(_1.time.toTimestamp(utc.date)); | ||
chai_1.expect(utc.unix).to.eql(_1.time.day(utc.date).unix()); | ||
@@ -38,3 +38,3 @@ }); | ||
chai_1.expect(utc.date).to.eql(_1.time.fromTimestamp(now)); | ||
chai_1.expect(utc.time).to.eql(now); | ||
chai_1.expect(utc.timestamp).to.eql(now); | ||
chai_1.expect(utc.unix).to.eql(_1.time.day(now).unix()); | ||
@@ -46,3 +46,3 @@ }); | ||
chai_1.expect(utc.date).to.eql(now); | ||
chai_1.expect(utc.time).to.eql(_1.time.toTimestamp(now)); | ||
chai_1.expect(utc.timestamp).to.eql(_1.time.toTimestamp(now)); | ||
chai_1.expect(utc.unix).to.eql(_1.time.day(now).unix()); | ||
@@ -56,5 +56,5 @@ }); | ||
chai_1.expect(utc.date).to.eql(d); | ||
chai_1.expect(utc.time).to.eql(_1.time.toTimestamp(d)); | ||
chai_1.expect(utc.timestamp).to.eql(_1.time.toTimestamp(d)); | ||
chai_1.expect(utc.unix).to.eql(_1.time.day(d).unix()); | ||
}); | ||
}); |
@@ -21,3 +21,3 @@ import { Dayjs, ConfigType } from 'dayjs'; | ||
date: Date; | ||
time: number; | ||
timestamp: number; | ||
unix: number; | ||
@@ -24,0 +24,0 @@ }; |
{ | ||
"name": "@platform/util.value", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Helpers for working with, transforming, and formatting values.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
147360