ngx-countdown-timer
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -9,3 +9,4 @@ import { OnInit, OnDestroy } from '@angular/core'; | ||
ngOnDestroy(): void; | ||
getTimeDiff(datetime: any): string; | ||
private getTimeDiff(datetime); | ||
private twoDigit(number); | ||
} |
11
index.js
@@ -41,4 +41,13 @@ import { Component, Input, NgModule } from '@angular/core'; | ||
var /** @type {?} */ day_string = (days) ? days + " " : ""; | ||
return day_string + date_diff.getHours() + ":" + date_diff.getMinutes() + ":" + date_diff.getSeconds() + ""; | ||
return this.twoDigit(parseInt(day_string)) + this.twoDigit(date_diff.getHours()) + | ||
":" + this.twoDigit(date_diff.getMinutes()) + ":" | ||
+ this.twoDigit(date_diff.getSeconds()); | ||
}; | ||
/** | ||
* @param {?} number | ||
* @return {?} | ||
*/ | ||
CountdownTimer.prototype.twoDigit = function (number) { | ||
return number > 9 ? "" + number : "0" + number; | ||
}; | ||
return CountdownTimer; | ||
@@ -45,0 +54,0 @@ }()); |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":3,"metadata":{"CountdownTimerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"CountdownTimer"}],"exports":[{"__symbolic":"reference","name":"CountdownTimer"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"CountdownTimerModule"}}}}},"CountdownTimer":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"countdown-timer","template":"<span>{{ displayTime }}</span>"}]}],"members":{"end":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"getTimeDiff":[{"__symbolic":"method"}]}}},"origins":{"CountdownTimerModule":"./index","CountdownTimer":"./countdown-timer.component"},"importAs":"ngx-countdown-timer"} | ||
{"__symbolic":"module","version":3,"metadata":{"CountdownTimerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"CountdownTimer"}],"exports":[{"__symbolic":"reference","name":"CountdownTimer"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"CountdownTimerModule"}}}}},"CountdownTimer":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"countdown-timer","template":"<span>{{ displayTime }}</span>"}]}],"members":{"end":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"getTimeDiff":[{"__symbolic":"method"}],"twoDigit":[{"__symbolic":"method"}]}}},"origins":{"CountdownTimerModule":"./index","CountdownTimer":"./countdown-timer.component"},"importAs":"ngx-countdown-timer"} |
@@ -44,4 +44,13 @@ (function (global, factory) { | ||
var /** @type {?} */ day_string = (days) ? days + " " : ""; | ||
return day_string + date_diff.getHours() + ":" + date_diff.getMinutes() + ":" + date_diff.getSeconds() + ""; | ||
return this.twoDigit(parseInt(day_string)) + this.twoDigit(date_diff.getHours()) + | ||
":" + this.twoDigit(date_diff.getMinutes()) + ":" | ||
+ this.twoDigit(date_diff.getSeconds()); | ||
}; | ||
/** | ||
* @param {?} number | ||
* @return {?} | ||
*/ | ||
CountdownTimer.prototype.twoDigit = function (number) { | ||
return number > 9 ? "" + number : "0" + number; | ||
}; | ||
return CountdownTimer; | ||
@@ -48,0 +57,0 @@ }()); |
{ | ||
"name": "ngx-countdown-timer", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9991
218