@datarailsshared/dr_renderer 1.2.75 → 1.2.76

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.2.75",
3
+ "version": "1.2.76",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -497,11 +497,11 @@ 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;
500
+ var padStartTime = function(time) {
501
+ if (time < 10) {
502
+ return '0' + time;
503
503
  }
504
- return minutes;
504
+ return time;
505
505
  }
506
506
 
507
507
  // Build res
@@ -513,11 +513,11 @@ var DataFormatterImpl = function () {
513
513
  }
514
514
 
515
515
  if (fmin) {
516
- return fmin + _this3.applyNumberPattern(adjustMinutesValue(minutes), '00');
516
+ return fmin + _this3.applyNumberPattern(padStartTime(minutes), '00');
517
517
  }
518
518
 
519
519
  if (fmin2) {
520
- return _this3.applyNumberPattern(adjustMinutesValue(minutes), '00') + fmin2;
520
+ return _this3.applyNumberPattern(padStartTime(minutes), '00') + fmin2;
521
521
  }
522
522
 
523
523
  if (mmin) {
@@ -534,7 +534,7 @@ var DataFormatterImpl = function () {
534
534
  return res.replace(/(ss)|(s)|(hh)|(h)|(dddd)|(ddd)|(dd)|(d)|(mmmmm)|(mmmm)|(mmm)|(mm)|(m)|(yyyy)|(yy)|(\[\])/gi, function (a, ss, s, hh, h, dddd, ddd, dd, d, mmmmm, mmmm, mmm, mm, m, yyyy, yy, ampm) {
535
535
 
536
536
  if (ss) {
537
- return _this3.applyNumberPattern(seconds, '00');
537
+ return _this3.applyNumberPattern(padStartTime(seconds), '00');
538
538
  }
539
539
 
540
540
  if (s) {
@@ -542,7 +542,7 @@ var DataFormatterImpl = function () {
542
542
  }
543
543
 
544
544
  if (hh) {
545
- return _this3.applyNumberPattern(foundAMPM ? hours % 12 : hours, '00');
545
+ return _this3.applyNumberPattern(padStartTime(foundAMPM ? hours % 12 : hours), '00');
546
546
  }
547
547
 
548
548
  if (h) {
@@ -4307,6 +4307,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
4307
4307
  format = format.replace('dd', 'DD');
4308
4308
  format = format.replace('yyyy', 'YYYY');
4309
4309
  format = format.replace('yy', 'YY');
4310
+ format = lodash.replace(format, /h/g, 'H');
4310
4311
  return moment_lib(tryParse).utcOffset(0).format(format) + "";
4311
4312
  } else {
4312
4313
  return 'Wrong date format';