@datarailsshared/dr_renderer 1.2.73 → 1.2.74
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.
- package/package.json +1 -1
- package/src/dataformatter.js +9 -2
package/package.json
CHANGED
package/src/dataformatter.js
CHANGED
|
@@ -497,6 +497,13 @@ var DataFormatterImpl = function () {
|
|
|
497
497
|
var minutes = n.getMinutes();
|
|
498
498
|
var seconds = n.getSeconds();
|
|
499
499
|
|
|
500
|
+
var adjustMinutesValue = function(minutes) {
|
|
501
|
+
if (minutes < 10) {
|
|
502
|
+
return '0' + minutes;
|
|
503
|
+
}
|
|
504
|
+
return minutes;
|
|
505
|
+
}
|
|
506
|
+
|
|
500
507
|
// Build res
|
|
501
508
|
var res = pattern.replace(/((?:am\/pm)|(?:a\/p))|(?:(h[^ydsap]*?)mm)|(?:mm([^ydh]*?s))|(?:(h[^ydsap]*?)m)|(?:m([^ydh]*?s))/gi, function (a, ampm, fmin, fmin2, mmin, mmin2) {
|
|
502
509
|
|
|
@@ -506,11 +513,11 @@ var DataFormatterImpl = function () {
|
|
|
506
513
|
}
|
|
507
514
|
|
|
508
515
|
if (fmin) {
|
|
509
|
-
return fmin + _this3.applyNumberPattern(minutes, '00');
|
|
516
|
+
return fmin + _this3.applyNumberPattern(adjustMinutesValue(minutes), '00');
|
|
510
517
|
}
|
|
511
518
|
|
|
512
519
|
if (fmin2) {
|
|
513
|
-
return _this3.applyNumberPattern(minutes, '00') + fmin2;
|
|
520
|
+
return _this3.applyNumberPattern(adjustMinutesValue(minutes), '00') + fmin2;
|
|
514
521
|
}
|
|
515
522
|
|
|
516
523
|
if (mmin) {
|