biz9-logic 3.5.23 → 3.5.25

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.
Files changed (3) hide show
  1. package/biz9_config +1 -1
  2. package/index.js +15 -3
  3. package/package.json +1 -1
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='3.7.3'
1
+ VERSION='3.7.5'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -296,7 +296,7 @@ class Stock {
296
296
  return r_list;
297
297
  };
298
298
  static get_event_stock_by_value = (stock_val) => {
299
- switch(title)
299
+ switch(stock_val)
300
300
  {
301
301
  case "0":
302
302
  return 'Sold Out';
@@ -322,7 +322,7 @@ class Stock {
322
322
  return r_list;
323
323
  };
324
324
  static get_service_stock_by_value = (stock_val) => {
325
- switch(title)
325
+ switch(stock_val)
326
326
  {
327
327
  case "0":
328
328
  return 'No Sessions Availble';
@@ -346,7 +346,7 @@ class Stock {
346
346
  return r_list;
347
347
  };
348
348
  static get_product_stock_by_value = (stock_val) => {
349
- switch(title)
349
+ switch(stock_val)
350
350
  {
351
351
  case "0":
352
352
  return 'Out of Stock';
@@ -366,7 +366,19 @@ class Stock {
366
366
  }
367
367
  };
368
368
  }
369
+ class DateTime {
370
+ static get_full_date_by_date_time = (date,time) => {
371
+ return moment(date+ " " + time, 'YYYY-MM-DD h:mm').format("dddd MMMM Do, YYYY");
372
+ }
373
+ static get_full_time_by_date_time = (date,time) => {
374
+ return moment(date+ " " + time, 'YYYY-MM-DD h:mm').format("h:mm a");
375
+ }
376
+ static get_full_date_time_by_date_time = (date,time) => {
377
+ return moment(date+ " " + time, 'YYYY-MM-DD h:mm').format("dddd MMMM Do, YYYY h:mm a");
378
+ }
379
+ };
369
380
  module.exports = {
381
+ DateTime,
370
382
  Stock,
371
383
  DataType,
372
384
  DataItem,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "3.5.23",
3
+ "version": "3.5.25",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"