@osovitny/anatoly 2.0.42 → 2.0.43

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.
@@ -722,7 +722,6 @@
722
722
  return "Invalid Date";
723
723
  };
724
724
  LocalizationService.prototype.getLocalizedDateTime = function (key) {
725
- //To Do Manoj: Test in IE and make TimeZone specific changes accordingly
726
725
  var dateValue = new Date(key);
727
726
  if (dateFns.isValid(dateValue)) {
728
727
  var localDate = Convert.toLocalizedDateTime(dateValue);
@@ -742,10 +741,10 @@
742
741
  }
743
742
  if (browserTimeZone) {
744
743
  var localDateTime = dateFnsTz.utcToZonedTime(key, browserTimeZone);
745
- return dateFns.format(localDateTime, 'd.M.yyyy HH:mm', this.dateFnsLocale);
744
+ return dateFns.format(localDateTime, 'dd.MM.yyyy HH:mm', this.dateFnsLocale);
746
745
  }
747
746
  else {
748
- return dateFns.format(new Date(key), 'd.M.yyyy HH:mm', this.dateFnsLocale);
747
+ return dateFns.format(new Date(key), 'dd.MM.yyyy HH:mm', this.dateFnsLocale);
749
748
  }
750
749
  };
751
750
  //https://date-fns.org/v1.30.1/docs/distanceInWords
@@ -833,10 +832,10 @@
833
832
  return;
834
833
  }
835
834
  if (!type) {
836
- type = 't';
835
+ type = 'tr';
837
836
  }
838
837
  //Translate
839
- if (type === 't') {
838
+ if (type === 'tr') {
840
839
  return this.localizeService.getLocalizedValue(inputData);
841
840
  }
842
841
  //Date
@@ -847,19 +846,20 @@
847
846
  if (type === 'dt') {
848
847
  return this.localizeService.getLocalizedDateTime(inputData);
849
848
  }
850
- if (type === 'uldt') {
849
+ //UTC DateTime
850
+ if (type === 'u2dt') {
851
851
  return this.localizeService.getUTCToLocalizedDateTime(inputData);
852
852
  }
853
- //DistanceToNowInWords
854
- if (type === 'uldis2now') {
855
- return this.localizeService.getUTCToLocalizedDistanceToNowInWords(inputData);
853
+ //DistanceInWords
854
+ if (type === 'dis') {
855
+ return this.localizeService.getLocalizedDistanceInWords(inputData, param2);
856
856
  }
857
+ //DistanceToNowInWords
857
858
  if (type === 'dis2now') {
858
859
  return this.localizeService.getLocalizedDistanceToNowInWords(inputData);
859
860
  }
860
- //DistanceInWords
861
- if (type === 'dis') {
862
- return this.localizeService.getLocalizedDistanceInWords(inputData, param2);
861
+ if (type === 'u2dis2now') {
862
+ return this.localizeService.getUTCToLocalizedDistanceToNowInWords(inputData);
863
863
  }
864
864
  return inputData;
865
865
  };