@osimatic/helpers-js 1.1.71 → 1.1.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/duration.js +4 -0
  2. package/package.json +1 -1
package/duration.js CHANGED
@@ -34,6 +34,8 @@ class Duration {
34
34
  }
35
35
 
36
36
  static convertToDurationInHourChronoDisplay(durationInSeconds, displayMode='chrono') {
37
+ durationInSeconds = Math.round(durationInSeconds);
38
+
37
39
  let durationInSecondsOriginal = durationInSeconds;
38
40
  durationInSeconds = Math.abs(durationInSeconds);
39
41
  let seconds = ( durationInSeconds % 60 );
@@ -50,6 +52,8 @@ class Duration {
50
52
  }
51
53
 
52
54
  static convertToDurationInHourStringDisplay(durationInSeconds, withSecondes=true, withMinutes=true, withLibelleMinute=true, libelleEntier=false) {
55
+ durationInSeconds = Math.round(durationInSeconds);
56
+
53
57
  // Heures
54
58
  let strHeure = '';
55
59
  let nbHeures = this.getNbHoursOfDurationInSeconds(durationInSeconds);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.1.71",
3
+ "version": "1.1.72",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"