ngx-countdown-timer
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -7,2 +7,3 @@ import { OnInit, OnDestroy, ElementRef } from '@angular/core'; | ||
zeroTrigger: any; | ||
timeOnly: any; | ||
timer: any; | ||
@@ -9,0 +10,0 @@ displayTime: any; |
18
index.js
@@ -56,6 +56,15 @@ import { Component, ElementRef, EventEmitter, Input, NgModule, Output } from '@angular/core'; | ||
var /** @type {?} */ day_string = (days) ? this.twoDigit(days) + ":" : ""; | ||
// Date() takes a UTC timestamp – getHours() gets hours in local time not in UTC. therefore we have to use getUTCHours() | ||
return day_string + this.twoDigit(date_diff.getUTCHours()) + | ||
":" + this.twoDigit(date_diff.getMinutes()) + ":" | ||
+ this.twoDigit(date_diff.getSeconds()); | ||
var /** @type {?} */ day_hours = days * 24; | ||
if (this.timeOnly) { | ||
var /** @type {?} */ hours = date_diff.getUTCHours() + day_hours; | ||
return this.twoDigit(hours) + | ||
":" + this.twoDigit(date_diff.getMinutes()) + ":" | ||
+ this.twoDigit(date_diff.getSeconds()); | ||
} | ||
else { | ||
// Date() takes a UTC timestamp – getHours() gets hours in local time not in UTC. therefore we have to use getUTCHours() | ||
return day_string + this.twoDigit(date_diff.getUTCHours()) + | ||
":" + this.twoDigit(date_diff.getMinutes()) + ":" | ||
+ this.twoDigit(date_diff.getSeconds()); | ||
} | ||
}; | ||
@@ -94,2 +103,3 @@ /** | ||
'zeroTrigger': [{ type: Output },], | ||
'timeOnly': [{ type: Input },], | ||
}; | ||
@@ -96,0 +106,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":"{{ displayTime }}"}]}],"members":{"start":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"end":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"zeroTrigger":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"getTimeDiff":[{"__symbolic":"method"}],"twoDigit":[{"__symbolic":"method"}],"stopTimer":[{"__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":"{{ displayTime }}"}]}],"members":{"start":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"end":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"zeroTrigger":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"timeOnly":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"getTimeDiff":[{"__symbolic":"method"}],"twoDigit":[{"__symbolic":"method"}],"stopTimer":[{"__symbolic":"method"}]}}},"origins":{"CountdownTimerModule":"./index","CountdownTimer":"./countdown-timer.component"},"importAs":"ngx-countdown-timer"} |
@@ -59,6 +59,15 @@ (function (global, factory) { | ||
var /** @type {?} */ day_string = (days) ? this.twoDigit(days) + ":" : ""; | ||
// Date() takes a UTC timestamp – getHours() gets hours in local time not in UTC. therefore we have to use getUTCHours() | ||
return day_string + this.twoDigit(date_diff.getUTCHours()) + | ||
":" + this.twoDigit(date_diff.getMinutes()) + ":" | ||
+ this.twoDigit(date_diff.getSeconds()); | ||
var /** @type {?} */ day_hours = days * 24; | ||
if (this.timeOnly) { | ||
var /** @type {?} */ hours = date_diff.getUTCHours() + day_hours; | ||
return this.twoDigit(hours) + | ||
":" + this.twoDigit(date_diff.getMinutes()) + ":" | ||
+ this.twoDigit(date_diff.getSeconds()); | ||
} | ||
else { | ||
// Date() takes a UTC timestamp – getHours() gets hours in local time not in UTC. therefore we have to use getUTCHours() | ||
return day_string + this.twoDigit(date_diff.getUTCHours()) + | ||
":" + this.twoDigit(date_diff.getMinutes()) + ":" | ||
+ this.twoDigit(date_diff.getSeconds()); | ||
} | ||
}; | ||
@@ -97,2 +106,3 @@ /** | ||
'zeroTrigger': [{ type: core.Output },], | ||
'timeOnly': [{ type: core.Input },], | ||
}; | ||
@@ -99,0 +109,0 @@ |
{ | ||
"name": "ngx-countdown-timer", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"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
13486
297