Skip to content

Commit

Permalink
comments added in source code
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshwarpatlolla committed Oct 8, 2015
1 parent b58335f commit a6c6a01
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/ionic-timepicker.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
scope.closeButtonType = scope.inputObj.closeButtonType ? scope.inputObj.closeButtonType : 'button-stable';

var obj = {epochTime: scope.inputEpochTime, step: scope.step, format: scope.format};

scope.time = {hours: 0, minutes: 0, meridian: ""};

var objDate = new Date(obj.epochTime * 1000); // Epoch time in milliseconds.

scope.increaseHours = function () {
Expand Down Expand Up @@ -67,17 +65,13 @@

scope.increaseMinutes = function () {
scope.time.minutes = Number(scope.time.minutes);

scope.time.minutes = (scope.time.minutes + obj.step) % 60;

scope.time.minutes = (scope.time.minutes < 10) ? ('0' + scope.time.minutes) : scope.time.minutes;
};

scope.decreaseMinutes = function () {
scope.time.minutes = Number(scope.time.minutes);

scope.time.minutes = (scope.time.minutes + (60 - obj.step)) % 60;

scope.time.minutes = (scope.time.minutes < 10) ? ('0' + scope.time.minutes) : scope.time.minutes;
};

Expand All @@ -93,7 +87,6 @@
}

if (obj.format == 12) {

scope.time.meridian = (objDate.getUTCHours() >= 12) ? "PM" : "AM";
scope.time.hours = (objDate.getUTCHours() > 12) ? ((objDate.getUTCHours() - 12)) : (objDate.getUTCHours());
scope.time.minutes = (objDate.getUTCMinutes());
Expand Down

0 comments on commit a6c6a01

Please sign in to comment.