Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into fix_humanize-duration-3.1.0-compatibility
  • Loading branch information
simonemazzoni committed Mar 9, 2017
1 parent ca57492 commit 57c60ea
Show file tree
Hide file tree
Showing 3 changed files with 461 additions and 288 deletions.
21 changes: 11 additions & 10 deletions dist/angular-timer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* angular-timer - v1.3.5 - 2017-03-09 11:42 AM
* angular-timer - v1.3.5 - 2017-03-09 2:18 PM
* https://github.com/siddii/angular-timer
*
* Copyright (c) 2017 Adrian Wardell
Expand Down Expand Up @@ -454,8 +454,9 @@ app.factory('I18nService', function() {
this.language = this.fallback;
}

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

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

if (typeof this.timeHumanizer != 'undefined'){
time = {
'millis' : this.timeHumanizer(diffFromAlarm, { units: ["milliseconds"] }),
'seconds' : this.timeHumanizer(diffFromAlarm, { units: ["seconds"] }),
'minutes' : this.timeHumanizer(diffFromAlarm, { units: ["minutes", "seconds"] }) ,
'hours' : this.timeHumanizer(diffFromAlarm, { units: ["hours", "minutes", "seconds"] }) ,
'days' : this.timeHumanizer(diffFromAlarm, { units: ["days", "hours", "minutes", "seconds"] }) ,
'months' : this.timeHumanizer(diffFromAlarm, { units: ["months", "days", "hours", "minutes", "seconds"] }) ,
'years' : this.timeHumanizer(diffFromAlarm, { units: ["years", "months", "days", "hours", "minutes", "seconds"] })
'millis' : this.timeHumanizer(diffFromAlarm, { units: ["ms"] }),
'seconds' : this.timeHumanizer(diffFromAlarm, { units: ["s"] }),
'minutes' : this.timeHumanizer(diffFromAlarm, { units: ["m", "s"] }) ,
'hours' : this.timeHumanizer(diffFromAlarm, { units: ["h", "m", "s"] }) ,
'days' : this.timeHumanizer(diffFromAlarm, { units: ["d", "h", "m", "s"] }) ,
'months' : this.timeHumanizer(diffFromAlarm, { units: ["mo", "d", "h", "m", "s"] }) ,
'years' : this.timeHumanizer(diffFromAlarm, { units: ["y", "mo", "d", "h", "m", "s"] })
};
}
else {
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-timer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 57c60ea

Please sign in to comment.