fix units
This commit is contained in:
parent
7825085db4
commit
d7902694c8
12
dist/smarttime.units.js
vendored
12
dist/smarttime.units.js
vendored
@ -2,19 +2,19 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.units = {
|
||||
years: (timesArg = 1) => {
|
||||
return timesArg * 3154e+10;
|
||||
return timesArg * 3.154e+10;
|
||||
},
|
||||
months: (timesArg = 1) => {
|
||||
return timesArg * 2628e+9;
|
||||
return timesArg * 2.628e+9;
|
||||
},
|
||||
weeks: (timesArg = 1) => {
|
||||
return timesArg * 6048e+8;
|
||||
return timesArg * 6.048e+8;
|
||||
},
|
||||
days: (timesArg = 1) => {
|
||||
return timesArg * 864e+7;
|
||||
return timesArg * 8.64e+7;
|
||||
},
|
||||
hours: (timesArg = 1) => {
|
||||
return timesArg * 36e+6;
|
||||
return timesArg * 3.6e+5;
|
||||
},
|
||||
minutes: (timesArg = 1) => {
|
||||
return timesArg * 60000;
|
||||
@ -45,4 +45,4 @@ exports.getMilliSecondsFromUnits = (combinationArg) => {
|
||||
}
|
||||
return timeInMilliseconds;
|
||||
};
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR0aW1lLnVuaXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnR0aW1lLnVuaXRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQVcsUUFBQSxLQUFLLEdBQUc7SUFDakIsS0FBSyxFQUFFLENBQUMsUUFBUSxHQUFHLENBQUM7UUFDbEIsTUFBTSxDQUFDLFFBQVEsR0FBRyxRQUFRLENBQUE7SUFDNUIsQ0FBQztJQUNELE1BQU0sRUFBRSxDQUFDLFFBQVEsR0FBRyxDQUFDO1FBQ25CLE1BQU0sQ0FBQyxRQUFRLEdBQUcsT0FBTyxDQUFBO0lBQzNCLENBQUM7SUFDRCxLQUFLLEVBQUUsQ0FBQyxRQUFRLEdBQ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SUFBQyxDQUFDO0lBQ25GLEVBQUUsQ0FBQyxDQUFDLGNBQWMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO1FBQUMsZUFBZSxDQUFDLGFBQUssQ0FBQyxLQUFLLENBQUMsY0FBYyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUE7SUFBQyxDQUFDO0lBQ2hGLEVBQUUsQ0FBQyxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO1FBQUMsZUFBZSxDQUFDLGFBQUssQ0FBQyxJQUFJLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUE7SUFBQyxDQUFDO0lBQzdFLEVBQUUsQ0FBQyxDQUFDLGNBQWMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO1FBQUMsZUFBZSxDQUFDLGFBQUssQ0FBQyxLQUFLLENBQUMsY0FBYyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUE7SUFBQyxDQUFDO0lBQ2hGLEVBQUUsQ0FBQyxDQUFDLGNBQWMsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO1FBQUMsZUFBZSxDQUFDLGFBQUssQ0FBQyxPQUFPLENBQUMsY0FBYyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUE7SUFBQyxDQUFDO0lBRXRGLE1BQU0sQ0FBQyxrQkFBa0IsQ0FBQTtBQUMzQixDQUFDLENBQUEifQ==
|
@ -1,18 +1,18 @@
|
||||
export let units = {
|
||||
years: (timesArg = 1): number => {
|
||||
return timesArg * 3154e+10
|
||||
return timesArg * 3.154e+10
|
||||
},
|
||||
months: (timesArg = 1): number => {
|
||||
return timesArg * 2628e+9
|
||||
return timesArg * 2.628e+9
|
||||
},
|
||||
weeks: (timesArg = 1) => {
|
||||
return timesArg * 6048e+8
|
||||
return timesArg * 6.048e+8
|
||||
},
|
||||
days: (timesArg = 1) => {
|
||||
return timesArg * 864e+7
|
||||
return timesArg * 8.64e+7
|
||||
},
|
||||
hours: (timesArg = 1) => {
|
||||
return timesArg * 36e+6
|
||||
return timesArg * 3.6e+5
|
||||
},
|
||||
minutes: (timesArg = 1) => {
|
||||
return timesArg * 60000
|
||||
|
Loading…
Reference in New Issue
Block a user