Skip to content

Commit dacc7ee

Browse files
Paul LeclercqPaul Leclercq
authored andcommitted
updates docs with available units and remove fullUnit, was the same as yearUnit
1 parent 530b793 commit dacc7ee

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

app/js/_timer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ var timerModule = angular.module('timer', [])
204204
$scope.dayUnit = timeUnits.days;
205205
$scope.monthUnit = timeUnits.months;
206206
$scope.yearUnit = timeUnits.years;
207-
$scope.fullUnit = timeUnits.full;
208207

209208
//add leading zero if number is smaller than 10
210209
$scope.sseconds = $scope.seconds < 10 ? '0' + $scope.seconds : $scope.seconds;

app/js/i18nService.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ app.factory('I18nService', function() {
3838
'hours' : this.timeHumanizer(diffFromAlarm, { units: ["hours", "minutes", "seconds"] }) ,
3939
'days' : this.timeHumanizer(diffFromAlarm, { units: ["days", "hours", "minutes", "seconds"] }) ,
4040
'months' : this.timeHumanizer(diffFromAlarm, { units: ["months", "days", "hours", "minutes", "seconds"] }) ,
41-
'years' : this.timeHumanizer(diffFromAlarm, { units: ["years", "months", "days", "hours", "minutes", "seconds"] }) ,
42-
'full' : this.timeHumanizer(diffFromAlarm) // "2 years, 1 month, 5 days, 6 hours, 9 minutes, 16 seconds"
41+
'years' : this.timeHumanizer(diffFromAlarm, { units: ["years", "months", "days", "hours", "minutes", "seconds"] })
4342
};
4443
}
4544
else {

index.html

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,28 @@ <h3>
9393

9494
<h3>Spanish</h3>
9595
<div id="spanish">
96-
<h4>Year max unit time : <timer interval="1000" language="es">{{fullUnit}}</timer></h4>
96+
<h4>Year max unit time : <timer interval="1000" language="es">{{yearUnit}}</timer></h4>
9797
<h4>Hour max unit time: <timer interval="1000" language="es">{{hourUnit}}</timer></h4>
9898
<h4>Second max unit time: <timer interval="1000" language="es">{{secondUnit}}</timer></h4>
9999
</div>
100100

101101

102102
<h3>French</h3>
103103
<div id="french">
104-
<h4>Year max unit time : <timer interval="1000" language="fr">{{fullUnit}}</timer></h4>
104+
<h4>Year max unit time : <timer interval="1000" language="fr">{{yearUnit}}</timer></h4>
105105
<h4>Hour max unit time: <timer interval="1000" language="fr">{{hourUnit}}</timer></h4>
106106
<h4>Second max unit time: <timer interval="1000" language="fr">{{secondUnit}}</timer></h4>
107107
</div>
108+
109+
<h3>Available units</h3>
110+
<ul>
111+
<li>secondUnit: 8 164 816 seconds</li>
112+
<li>minuteUnit: 136 089 minutes, 16 seconds</li>
113+
<li>hourUnit: 18 126 hours,9 minutes, 16 seconds</li>
114+
<li>dayUnit: 755 days, 6 hours, 9 minutes, 16 seconds</li>
115+
<li>monthUnit: 25 month, 5 days, 6 hours, 9 minutes, 16 seconds</li>
116+
<li>yearUnit : 2 years, 1 month, 5 days, 6 hours, 9 minutes, 16 seconds</li>
117+
</ul>
108118
</div>
109119
</section>
110120
<section id="clock-timer-leading-zero">

0 commit comments

Comments
 (0)