biz9-logic 3.5.25 → 3.5.30

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 (4) hide show
  1. package/biz9_config +1 -1
  2. package/index.js +11 -11
  3. package/package.json +2 -2
  4. package/test.js +12 -1
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='3.7.5'
1
+ VERSION='3.8.0'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -5,7 +5,7 @@ License GNU General Public License v3.0
5
5
  Description: BiZ9 Framework: Logic-JS
6
6
  */
7
7
  const { get_new_item_main,get_data_config_main,get_cloud_url_main,get_biz_item_main,get_cloud_filter_obj_main,get_title_url_main } = require('./main');
8
- const {Log,Test,Str} = require('biz9-utility');
8
+ const {Log,Test,Str,DateTime} = require('biz9-utility');
9
9
  class Message {
10
10
  static SUCCESS="Update Success";
11
11
  static LOGIN_GOOD="Login Success";
@@ -365,20 +365,20 @@ class Stock {
365
365
  break;
366
366
  }
367
367
  };
368
+
368
369
  }
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");
370
+ class Schedule {
371
+ static get_start_date_time_by_list = (list) =>{
372
+ for(let a=0;a<list.length;a++){
373
+ list[a].start_date = DateTime.get_full_date_by_date_time(list[a].date,list[a].time);
374
+ list[a].start_time = DateTime.get_full_time_by_date_time(list[a].date,list[a].time);
375
+ list[a].start_date_time = DateTime.get_full_date_time_by_date_time(list[a].date,list[a].time);
376
+ }
377
+ return list;
378
378
  }
379
379
  };
380
380
  module.exports = {
381
- DateTime,
381
+ Schedule,
382
382
  Stock,
383
383
  DataType,
384
384
  DataItem,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "3.5.25",
3
+ "version": "3.5.30",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -10,7 +10,7 @@
10
10
  "dependencies": {
11
11
  "async-series": "^0.0.1",
12
12
  "biz9-scriptz": "^5.5.4",
13
- "biz9-utility": "^3.2.5",
13
+ "biz9-utility": "^3.5.2",
14
14
  "jest": "^29.7.0"
15
15
  },
16
16
  "repository": {
package/test.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const path = require('path');
2
2
  const series = require('async-series');
3
- const {DataItem,DataType,Url,Obj,BiZ_Url,Cat,Stock} = require('./');
3
+ const {DataItem,DataType,Url,Obj,BiZ_Url,Cat,Stock,Schedule} = require('./');
4
4
  const {Log,Test,Number} = require('biz9-utility');
5
5
  const {Scriptz}= require('biz9-scriptz');
6
6
 
@@ -28,6 +28,17 @@ const biz9_config ={
28
28
  describe("connect", () => {
29
29
  it("_connect", () => {
30
30
  series([
31
+ function(call) {
32
+ console.log('GET_START_DATE_TIME_BY_LIST-START');
33
+ event_list = [
34
+ {date:new Date(),time: new Date()},
35
+ {date:new Date(),time: new Date()},
36
+ {date:new Date(),time: new Date()}
37
+ ];
38
+ Log.w('get_event_list',Schedule.get_start_date_time_by_list(event_list));
39
+ console.log('GET_START_DATE_TIME_BY_LIST-END');
40
+ //call();
41
+ },
31
42
  function(call) {
32
43
  console.log('GET-ALL-STOCK-LIST-START');
33
44
  Log.w('get_event_list',Stock.get_event_stock_list());