diff options
author | vempo <vitaliy.emporopulo@amdocs.com> | 2018-07-24 17:34:04 +0300 |
---|---|---|
committer | vempo <vitaliy.emporopulo@amdocs.com> | 2018-07-25 11:39:10 +0300 |
commit | a52d50e788792a63e97a9176ab319d53db7a2853 (patch) | |
tree | b1c2222cacf4b8192aea16d1e0315b1f005c5347 /sdc-workflow-designer-ui/src/app/paletx/plx-datepicker/time.ts | |
parent | 3c2665debb400aef7f0ed9e235698d2ff9f859db (diff) |
Replaced old implementation at root
Old project files and directories has been moved
under 'deprecated-workflow-designer'. The old project
is not built by the CI anymore, but can be still built manually.
New modules/directories have been moved up and integrated with
the CI system.
Change-Id: I1528c792bcbcce9e50bfc294a1328a20e72c91cf
Issue-ID: SDC-1559
Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/paletx/plx-datepicker/time.ts')
-rw-r--r-- | sdc-workflow-designer-ui/src/app/paletx/plx-datepicker/time.ts | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/sdc-workflow-designer-ui/src/app/paletx/plx-datepicker/time.ts b/sdc-workflow-designer-ui/src/app/paletx/plx-datepicker/time.ts deleted file mode 100644 index ab31a498..00000000 --- a/sdc-workflow-designer-ui/src/app/paletx/plx-datepicker/time.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { isNumber, toInteger } from './util/util'; - -export class NgbTime { - public hour: number; - public minute: number; - public second: number; - - constructor(hour?: number, minute?: number, second?: number) { - this.hour = toInteger(hour); - this.minute = toInteger(minute); - this.second = toInteger(second); - } - - public changeHour(step = 1) { this.updateHour((isNaN(this.hour) ? 0 : this.hour) + step); } - - public updateHour(hour: number) { - if (isNumber(hour)) { - this.hour = (hour < 0 ? 24 + hour : hour) % 24; - } else { - this.hour = NaN; - } - } - - public changeMinute(step = 1) { this.updateMinute((isNaN(this.minute) ? 0 : this.minute) + step); } - - public updateMinute(minute: number) { - if (isNumber(minute)) { - this.minute = minute % 60 < 0 ? 60 + minute % 60 : minute % 60; - this.changeHour(Math.floor(minute / 60)); - } else { - this.minute = NaN; - } - } - - public changeSecond(step = 1) { this.updateSecond((isNaN(this.second) ? 0 : this.second) + step); } - - public updateSecond(second: number) { - if (isNumber(second)) { - this.second = second < 0 ? 60 + second % 60 : second % 60; - this.changeMinute(Math.floor(second / 60)); - } else { - this.second = NaN; - } - } - - public isValid(checkSecs = true) { - return isNumber(this.hour) && isNumber(this.minute) && (checkSecs ? isNumber(this.second) : true); - } - - public toString() { return `${this.hour || 0}:${this.minute || 0}:${this.second || 0}`; } -} |