@abaplint/runtime 2.6.0 → 2.6.1

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.
@@ -73,6 +73,9 @@ function eq(left, right) {
73
73
  if (left instanceof types_1.Character) {
74
74
  l = left.getTrimEnd();
75
75
  }
76
+ else if (left instanceof types_1.Date) {
77
+ l = left.get().trimEnd();
78
+ }
76
79
  else if (typeof left === "object") {
77
80
  l = left.get();
78
81
  }
@@ -83,6 +86,9 @@ function eq(left, right) {
83
86
  if (right instanceof types_1.Character) {
84
87
  r = right.getTrimEnd();
85
88
  }
89
+ else if (right instanceof types_1.Date) {
90
+ l = right.get().trimEnd();
91
+ }
86
92
  else if (typeof right === "object") {
87
93
  r = right.get();
88
94
  }
@@ -95,7 +95,7 @@ function assign(input) {
95
95
  }
96
96
  }
97
97
  else if (!(input.source instanceof types_1.Table)) {
98
- result = input.source.get()[component.toLowerCase()];
98
+ result = input.source.get()[component.toLowerCase().trimEnd()];
99
99
  }
100
100
  if (result === undefined) {
101
101
  // not a field in the structure
@@ -31,6 +31,12 @@ class Date {
31
31
  else {
32
32
  this.set(value.get());
33
33
  }
34
+ if (this.value.length > 8) {
35
+ this.value = this.value.substr(0, 8);
36
+ }
37
+ else if (this.value.length < 8) {
38
+ this.value = this.value.padEnd(8, " ");
39
+ }
34
40
  return this;
35
41
  }
36
42
  clear() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",