Commit 8d7d9629 authored by wildfirecode13's avatar wildfirecode13

1

parent b96bf7cf
......@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
Object.defineProperty(exports, "__esModule", { value: true });
exports.Countdown = void 0;
var event_1 = require("../event");
function getNum(n) {
function getTimeNum(n) {
return n >= 10 ? "" + n : "0" + n;
}
var Countdown = /** @class */ (function (_super) {
......@@ -41,13 +41,13 @@ var Countdown = /** @class */ (function (_super) {
var hours = Math.floor(left / 3600);
var minutes = Math.floor((left % 3600) / 60);
var seconds = left - hours * 3600 - minutes * 60;
return getNum(hours) + ":" + getNum(minutes) + ":" + getNum(seconds);
return getTimeNum(hours) + ":" + getTimeNum(minutes) + ":" + getTimeNum(seconds);
};
Countdown.prototype.getMMSS = function () {
var left = this._seconds - this._counter;
var minutes = Math.floor(left / 60);
var seconds = left % 60;
return getNum(minutes) + ":" + getNum(seconds);
return getTimeNum(minutes) + ":" + getTimeNum(seconds);
};
Countdown.prototype.getText = function () {
return this._text.replace("{0}", this.getCountdown());
......
import { Countdown } from "./Countdown";
import { Timer } from "./Timer";
import { getDateTimer } from "./tools";
export { Timer, getDateTimer, Countdown };
export * from "./Countdown";
export * from "./Timer";
export * from "./tools";
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Countdown = exports.getDateTimer = exports.Timer = void 0;
var Countdown_1 = require("./Countdown");
Object.defineProperty(exports, "Countdown", { enumerable: true, get: function () { return Countdown_1.Countdown; } });
var Timer_1 = require("./Timer");
Object.defineProperty(exports, "Timer", { enumerable: true, get: function () { return Timer_1.Timer; } });
var tools_1 = require("./tools");
Object.defineProperty(exports, "getDateTimer", { enumerable: true, get: function () { return tools_1.getDateTimer; } });
__exportStar(require("./Countdown"), exports);
__exportStar(require("./Timer"), exports);
__exportStar(require("./tools"), exports);
import { Countdown } from "./Countdown";
import { Timer } from "./Timer";
import { getDateTimer } from "./tools";
export { Timer, getDateTimer ,Countdown};
export * from "./Countdown";
export * from "./Timer";
export * from "./tools";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment