Skip to content

Commit 57c60ea

Browse files
committed
Merge branch 'master' of https://github.com/simonemazzoni/angular-timer into fix_humanize-duration-3.1.0-compatibility
1 parent ca57492 commit 57c60ea

File tree

3 files changed

+461
-288
lines changed

3 files changed

+461
-288
lines changed

dist/angular-timer.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* angular-timer - v1.3.5 - 2017-03-09 11:42 AM
2+
* angular-timer - v1.3.5 - 2017-03-09 2:18 PM
33
* https://github.com/siddii/angular-timer
44
*
55
* Copyright (c) 2017 Adrian Wardell
@@ -454,8 +454,9 @@ app.factory('I18nService', function() {
454454
this.language = this.fallback;
455455
}
456456

457-
//moment init
458-
moment.locale(this.language); // @TODO maybe to remove, it should be handle by the user's application itself, and not inside the directive
457+
// It should be handle by the user's application itself, and not inside the directive
458+
// moment init
459+
// moment.locale(this.language);
459460

460461
//human duration init, using it because momentjs does not allow accurate time (
461462
// momentJS: a few moment ago, human duration : 4 seconds ago
@@ -477,13 +478,13 @@ app.factory('I18nService', function() {
477478

478479
if (typeof this.timeHumanizer != 'undefined'){
479480
time = {
480-
'millis' : this.timeHumanizer(diffFromAlarm, { units: ["milliseconds"] }),
481-
'seconds' : this.timeHumanizer(diffFromAlarm, { units: ["seconds"] }),
482-
'minutes' : this.timeHumanizer(diffFromAlarm, { units: ["minutes", "seconds"] }) ,
483-
'hours' : this.timeHumanizer(diffFromAlarm, { units: ["hours", "minutes", "seconds"] }) ,
484-
'days' : this.timeHumanizer(diffFromAlarm, { units: ["days", "hours", "minutes", "seconds"] }) ,
485-
'months' : this.timeHumanizer(diffFromAlarm, { units: ["months", "days", "hours", "minutes", "seconds"] }) ,
486-
'years' : this.timeHumanizer(diffFromAlarm, { units: ["years", "months", "days", "hours", "minutes", "seconds"] })
481+
'millis' : this.timeHumanizer(diffFromAlarm, { units: ["ms"] }),
482+
'seconds' : this.timeHumanizer(diffFromAlarm, { units: ["s"] }),
483+
'minutes' : this.timeHumanizer(diffFromAlarm, { units: ["m", "s"] }) ,
484+
'hours' : this.timeHumanizer(diffFromAlarm, { units: ["h", "m", "s"] }) ,
485+
'days' : this.timeHumanizer(diffFromAlarm, { units: ["d", "h", "m", "s"] }) ,
486+
'months' : this.timeHumanizer(diffFromAlarm, { units: ["mo", "d", "h", "m", "s"] }) ,
487+
'years' : this.timeHumanizer(diffFromAlarm, { units: ["y", "mo", "d", "h", "m", "s"] })
487488
};
488489
}
489490
else {

dist/angular-timer.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)