@bbn/bbn 2.0.20 → 2.0.21

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/dist/date.js CHANGED
@@ -850,6 +850,9 @@ class bbnDateTool {
850
850
  return __classPrivateFieldGet(this, _bbnDateTool_value, "f") ? this.format() : '';
851
851
  }
852
852
  year(v) {
853
+ if (!__classPrivateFieldGet(this, _bbnDateTool_value, "f")) {
854
+ return undefined;
855
+ }
853
856
  if (0 in arguments && (v !== undefined) && !(v instanceof Event)) {
854
857
  const d = this.copy();
855
858
  d.setFullYear(v);
@@ -858,6 +861,9 @@ class bbnDateTool {
858
861
  return __classPrivateFieldGet(this, _bbnDateTool_value, "f").getFullYear();
859
862
  }
860
863
  month(v) {
864
+ if (!__classPrivateFieldGet(this, _bbnDateTool_value, "f")) {
865
+ return undefined;
866
+ }
861
867
  if (0 in arguments && (v !== undefined) && !(v instanceof Event)) {
862
868
  const d = this.copy();
863
869
  d.setMonth(v - 1);
@@ -866,6 +872,9 @@ class bbnDateTool {
866
872
  return __classPrivateFieldGet(this, _bbnDateTool_value, "f").getMonth() + 1;
867
873
  }
868
874
  day(v) {
875
+ if (!__classPrivateFieldGet(this, _bbnDateTool_value, "f")) {
876
+ return undefined;
877
+ }
869
878
  if (0 in arguments && (v !== undefined) && !(v instanceof Event)) {
870
879
  const d = this.copy();
871
880
  d.setDate(v);
@@ -874,6 +883,9 @@ class bbnDateTool {
874
883
  return __classPrivateFieldGet(this, _bbnDateTool_value, "f").getDate();
875
884
  }
876
885
  hour(v) {
886
+ if (!__classPrivateFieldGet(this, _bbnDateTool_value, "f")) {
887
+ return undefined;
888
+ }
877
889
  if (0 in arguments && (v !== undefined) && !(v instanceof Event)) {
878
890
  const d = this.copy();
879
891
  d.setHours(v);
@@ -882,6 +894,9 @@ class bbnDateTool {
882
894
  return __classPrivateFieldGet(this, _bbnDateTool_value, "f").getHours();
883
895
  }
884
896
  minute(v) {
897
+ if (!__classPrivateFieldGet(this, _bbnDateTool_value, "f")) {
898
+ return undefined;
899
+ }
885
900
  if (0 in arguments && (v !== undefined) && !(v instanceof Event)) {
886
901
  const d = this.copy();
887
902
  d.setMinutes(v);
@@ -890,6 +905,9 @@ class bbnDateTool {
890
905
  return __classPrivateFieldGet(this, _bbnDateTool_value, "f").getMinutes();
891
906
  }
892
907
  second(v) {
908
+ if (!__classPrivateFieldGet(this, _bbnDateTool_value, "f")) {
909
+ return undefined;
910
+ }
893
911
  if (0 in arguments && (v !== undefined) && !(v instanceof Event)) {
894
912
  const d = this.copy();
895
913
  d.setSeconds(v);
@@ -898,6 +916,9 @@ class bbnDateTool {
898
916
  return __classPrivateFieldGet(this, _bbnDateTool_value, "f").getSeconds();
899
917
  }
900
918
  weekday(v, past = false) {
919
+ if (!__classPrivateFieldGet(this, _bbnDateTool_value, "f")) {
920
+ return undefined;
921
+ }
901
922
  if (0 in arguments && (v !== undefined) && !(v instanceof Event)) {
902
923
  return this.setWeekday(v, past);
903
924
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.20",
3
+ "version": "2.0.21",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",