UNPKG

@putridparrot/conversion-units

Version:
480 lines (479 loc) 15.2 kB
"use strict"; // <auto-generated> // This code was generated by the UnitCodeGenerator tool // // Changes to this file will be lost if the code is regenerated // </auto-generated> Object.defineProperty(exports, "__esModule", { value: true }); exports.Time = void 0; var Time; (function (Time) { var Centuries = /** @class */ (function () { function Centuries() { } Centuries.toNanoseconds = function (value) { return value * 3.154e+18; }; Centuries.toMicroseconds = function (value) { return value * 3.154e+15; }; Centuries.toMilliseconds = function (value) { return value * 3.154e+12; }; Centuries.toSeconds = function (value) { return value * 3.154e+9; }; Centuries.toMinutes = function (value) { return value * 5.256e+7; }; Centuries.toHours = function (value) { return value * 876000.0; }; Centuries.toDays = function (value) { return value * 36500.0; }; Centuries.toWeeks = function (value) { return value * 5214.29; }; Centuries.toMonths = function (value) { return value * 1200.0; }; Centuries.toYears = function (value) { return value * 100.0; }; Centuries.toDecades = function (value) { return value * 10.0; }; return Centuries; }()); Time.Centuries = Centuries; var Days = /** @class */ (function () { function Days() { } Days.toNanoseconds = function (value) { return value * 8.64e+13; }; Days.toMicroseconds = function (value) { return value * 8.64e+10; }; Days.toMilliseconds = function (value) { return value * 8.64e+7; }; Days.toSeconds = function (value) { return value * 86400.0; }; Days.toMinutes = function (value) { return value * 1440.0; }; Days.toHours = function (value) { return value * 24.0; }; Days.toWeeks = function (value) { return value / 7.0; }; Days.toMonths = function (value) { return value / 30.4167; }; Days.toYears = function (value) { return value / 365.0; }; Days.toDecades = function (value) { return value / 3650.0; }; Days.toCenturies = function (value) { return value / 36500.0; }; return Days; }()); Time.Days = Days; var Decades = /** @class */ (function () { function Decades() { } Decades.toNanoseconds = function (value) { return value * 3.154e+17; }; Decades.toMicroseconds = function (value) { return value * 3.154e+14; }; Decades.toMilliseconds = function (value) { return value * 3.154e+11; }; Decades.toSeconds = function (value) { return value * 3.154e+8; }; Decades.toMinutes = function (value) { return value * 5.256e+6; }; Decades.toHours = function (value) { return value * 87600.0; }; Decades.toDays = function (value) { return value * 3650.0; }; Decades.toWeeks = function (value) { return value * 521.429; }; Decades.toMonths = function (value) { return value * 120.0; }; Decades.toYears = function (value) { return value * 10.0; }; Decades.toCenturies = function (value) { return value / 10.0; }; return Decades; }()); Time.Decades = Decades; var Hours = /** @class */ (function () { function Hours() { } Hours.toNanoseconds = function (value) { return value * 3.6e+12; }; Hours.toMicroseconds = function (value) { return value * 3.6e+9; }; Hours.toMilliseconds = function (value) { return value * 3.6e+6; }; Hours.toSeconds = function (value) { return value * 3600.0; }; Hours.toMinutes = function (value) { return value * 60.0; }; Hours.toDays = function (value) { return value / 24.0; }; Hours.toWeeks = function (value) { return value / 168.0; }; Hours.toMonths = function (value) { return value / 730.001; }; Hours.toYears = function (value) { return value / 8760.0; }; Hours.toDecades = function (value) { return value / 87600.0; }; Hours.toCenturies = function (value) { return value / 876000.0; }; return Hours; }()); Time.Hours = Hours; var Microseconds = /** @class */ (function () { function Microseconds() { } Microseconds.toNanoseconds = function (value) { return value * 1000.0; }; Microseconds.toMilliseconds = function (value) { return value / 1000.0; }; Microseconds.toSeconds = function (value) { return value / 1e+6; }; Microseconds.toMinutes = function (value) { return value / 6e+7; }; Microseconds.toHours = function (value) { return value / 3.6e+9; }; Microseconds.toDays = function (value) { return value / 8.64e+10; }; Microseconds.toWeeks = function (value) { return value / 6.048e+11; }; Microseconds.toMonths = function (value) { return value / 2629746000000.0; }; Microseconds.toYears = function (value) { return value / 3.154e+13; }; Microseconds.toDecades = function (value) { return value / 3.154e+14; }; Microseconds.toCenturies = function (value) { return value / 3.154e+15; }; return Microseconds; }()); Time.Microseconds = Microseconds; var Milliseconds = /** @class */ (function () { function Milliseconds() { } Milliseconds.toNanoseconds = function (value) { return value * 1e+6; }; Milliseconds.toMicroseconds = function (value) { return value * 1000.0; }; Milliseconds.toSeconds = function (value) { return value / 1000.0; }; Milliseconds.toMinutes = function (value) { return value / 60000.0; }; Milliseconds.toHours = function (value) { return value / 3.6e+6; }; Milliseconds.toDays = function (value) { return value / 8.64e+7; }; Milliseconds.toWeeks = function (value) { return value / 6.048e+8; }; Milliseconds.toMonths = function (value) { return value / 2629746000.0; }; Milliseconds.toYears = function (value) { return value / 31556952000.0; }; Milliseconds.toDecades = function (value) { return value / 3.154e+11; }; Milliseconds.toCenturies = function (value) { return value / 3.154e+12; }; return Milliseconds; }()); Time.Milliseconds = Milliseconds; var Minutes = /** @class */ (function () { function Minutes() { } Minutes.toNanoseconds = function (value) { return value * 6e+10; }; Minutes.toMicroseconds = function (value) { return value * 6e+7; }; Minutes.toMilliseconds = function (value) { return value * 60000.0; }; Minutes.toSeconds = function (value) { return value * 60.0; }; Minutes.toHours = function (value) { return value / 60.0; }; Minutes.toDays = function (value) { return value / 1440.0; }; Minutes.toWeeks = function (value) { return value / 10080.0; }; Minutes.toMonths = function (value) { return value / 43800.0; }; Minutes.toYears = function (value) { return value / 525600.0; }; Minutes.toDecades = function (value) { return value / 5.256e+6; }; Minutes.toCenturies = function (value) { return value / 5.256e+7; }; return Minutes; }()); Time.Minutes = Minutes; var Months = /** @class */ (function () { function Months() { } Months.toNanoseconds = function (value) { return value * 2629746000000000.0; }; Months.toMicroseconds = function (value) { return value * 2629746000000.0; }; Months.toMilliseconds = function (value) { return value * 2629746000.0; }; Months.toSeconds = function (value) { return value * 2.628e+6; }; Months.toMinutes = function (value) { return value * 43800.0; }; Months.toHours = function (value) { return value * 730.001; }; Months.toDays = function (value) { return value * 30.4167; }; Months.toWeeks = function (value) { return value * 4.34524; }; Months.toYears = function (value) { return value / 12.0; }; Months.toDecades = function (value) { return value / 120.0; }; Months.toCenturies = function (value) { return value / 1200.0; }; return Months; }()); Time.Months = Months; var Nanoseconds = /** @class */ (function () { function Nanoseconds() { } Nanoseconds.toMicroseconds = function (value) { return value / 1000.0; }; Nanoseconds.toMilliseconds = function (value) { return value / 1e+6; }; Nanoseconds.toSeconds = function (value) { return value / 1e+9; }; Nanoseconds.toMinutes = function (value) { return value / 6e+10; }; Nanoseconds.toHours = function (value) { return value / 3.6e+12; }; Nanoseconds.toDays = function (value) { return value / 8.64e+13; }; Nanoseconds.toWeeks = function (value) { return value / 6.048e+14; }; Nanoseconds.toMonths = function (value) { return value / 2629746000000000.0; }; Nanoseconds.toYears = function (value) { return value / 3.154e+16; }; Nanoseconds.toDecades = function (value) { return value / 3.154e+17; }; Nanoseconds.toCenturies = function (value) { return value / 3.154e+18; }; return Nanoseconds; }()); Time.Nanoseconds = Nanoseconds; var Seconds = /** @class */ (function () { function Seconds() { } Seconds.toNanoseconds = function (value) { return value * 1e+9; }; Seconds.toMicroseconds = function (value) { return value * 1e+6; }; Seconds.toMilliseconds = function (value) { return value * 1000.0; }; Seconds.toMinutes = function (value) { return value / 60.0; }; Seconds.toHours = function (value) { return value / 3600.0; }; Seconds.toDays = function (value) { return value / 86400.0; }; Seconds.toWeeks = function (value) { return value / 604800.0; }; Seconds.toMonths = function (value) { return value / 2.628e+6; }; Seconds.toYears = function (value) { return value / 3.1536e+7; }; Seconds.toDecades = function (value) { return value / 3.154e+8; }; Seconds.toCenturies = function (value) { return value / 3.154e+9; }; return Seconds; }()); Time.Seconds = Seconds; var Weeks = /** @class */ (function () { function Weeks() { } Weeks.toNanoseconds = function (value) { return value * 6.048e+14; }; Weeks.toMicroseconds = function (value) { return value * 6.048e+11; }; Weeks.toMilliseconds = function (value) { return value * 6.048e+8; }; Weeks.toSeconds = function (value) { return value * 604800.0; }; Weeks.toMinutes = function (value) { return value * 10080.0; }; Weeks.toHours = function (value) { return value * 168.0; }; Weeks.toDays = function (value) { return value * 7.0; }; Weeks.toMonths = function (value) { return value / 4.34524; }; Weeks.toYears = function (value) { return value / 52.143; }; Weeks.toDecades = function (value) { return value / 521.429; }; Weeks.toCenturies = function (value) { return value / 5214.29; }; return Weeks; }()); Time.Weeks = Weeks; var Years = /** @class */ (function () { function Years() { } Years.toNanoseconds = function (value) { return value * 3.154e+16; }; Years.toMicroseconds = function (value) { return value * 3.154e+13; }; Years.toMilliseconds = function (value) { return value * 31556952000.0; }; Years.toSeconds = function (value) { return value * 3.1536e+7; }; Years.toMinutes = function (value) { return value * 525600.0; }; Years.toHours = function (value) { return value * 8760.0; }; Years.toDays = function (value) { return value * 365.0; }; Years.toWeeks = function (value) { return value * 52.143; }; Years.toMonths = function (value) { return value * 12.0; }; Years.toDecades = function (value) { return value / 10.0; }; Years.toCenturies = function (value) { return value / 100.0; }; return Years; }()); Time.Years = Years; })(Time = exports.Time || (exports.Time = {}));