bkper-js 1.47.0 → 1.47.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.
@@ -620,7 +620,7 @@ export class Transaction {
620
620
  * @returns The date the transaction was created, formatted according to the date pattern of the [[Book]].
621
621
  */
622
622
  getCreatedAtFormatted() {
623
- return Utils.formatDate(this.getCreatedAt(), this.book.getTimeZone(), this.book.getDatePattern() + " HH:mm:ss");
623
+ return Utils.formatDate(this.getCreatedAt(), this.book.getDatePattern() + " HH:mm:ss", this.book.getTimeZone());
624
624
  }
625
625
  /**
626
626
  * @returns The date the transaction was last updated.
@@ -632,7 +632,7 @@ export class Transaction {
632
632
  * @returns The date the transaction was last updated, formatted according to the date pattern of the [[Book]].
633
633
  */
634
634
  getUpdatedAtFormatted() {
635
- return Utils.formatDate(this.getUpdatedAt(), this.book.getTimeZone(), this.book.getDatePattern() + " HH:mm:ss");
635
+ return Utils.formatDate(this.getUpdatedAt(), this.book.getDatePattern() + " HH:mm:ss", this.book.getTimeZone());
636
636
  }
637
637
  //EVOLVED BALANCES
638
638
  /** @internal */
package/lib/utils.js CHANGED
@@ -106,8 +106,7 @@ export function formatDate(date, pattern, timeZone) {
106
106
  if (!pattern) {
107
107
  return formatDateISO(date, timeZone);
108
108
  }
109
- var formatedDate = DateTime.fromJSDate(date, { zone: timeZone }).toFormat(pattern);
110
- return formatedDate;
109
+ return DateTime.fromJSDate(date, { zone: timeZone }).toFormat(pattern);
111
110
  }
112
111
  export function formatDateISO(date, timeZone) {
113
112
  if (date == null || !(Object.prototype.toString.call(date) === '[object Date]')) {
@@ -116,8 +115,7 @@ export function formatDateISO(date, timeZone) {
116
115
  if (!timeZone || timeZone == "") {
117
116
  timeZone = "UTC";
118
117
  }
119
- var formatedDate = DateTime.fromJSDate(date, { zone: timeZone }).toISODate();
120
- return formatedDate;
118
+ return DateTime.fromJSDate(date, { zone: timeZone }).toISODate();
121
119
  }
122
120
  export function getIsoDateValue(date) {
123
121
  return +(date.replace(/-/g, ''));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper-js",
3
- "version": "1.47.0",
3
+ "version": "1.47.1",
4
4
  "description": "Javascript client for Bkper REST API",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",