@bbn/bbn 1.0.106 → 1.0.107
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/bundle.d.ts +18 -0
- package/dist/bundle.js +18 -1
- package/dist/fn/datetime/calendar.d.ts +18 -0
- package/dist/fn/datetime/calendar.js +18 -1
- package/package.json +1 -1
package/dist/bundle.d.ts
CHANGED
|
@@ -1792,6 +1792,24 @@ declare module "fn/datetime/fdate" {
|
|
|
1792
1792
|
export { fdate };
|
|
1793
1793
|
}
|
|
1794
1794
|
declare module "fn/datetime/calendar" {
|
|
1795
|
+
/**
|
|
1796
|
+
* Returns a date with SQL format.
|
|
1797
|
+
*
|
|
1798
|
+
* @method dateSQL
|
|
1799
|
+
* @global
|
|
1800
|
+
*
|
|
1801
|
+
* @example
|
|
1802
|
+
* ``` javascript
|
|
1803
|
+
* //"2020-04-16 16:15:23"
|
|
1804
|
+
* let date = new Date();
|
|
1805
|
+
* bbn.fn.dateSQL(date,false);
|
|
1806
|
+
* ```
|
|
1807
|
+
*
|
|
1808
|
+
* @memberof bbn.fn
|
|
1809
|
+
* @param {Date|String} d
|
|
1810
|
+
* @param {String | false} wrong_result Whether or not include the time in the date
|
|
1811
|
+
* @returns {String}
|
|
1812
|
+
*/
|
|
1795
1813
|
const calendar: (d: any, wrong_result?: boolean) => any;
|
|
1796
1814
|
export { calendar };
|
|
1797
1815
|
}
|
package/dist/bundle.js
CHANGED
|
@@ -3695,7 +3695,24 @@
|
|
|
3695
3695
|
"use strict";
|
|
3696
3696
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3697
3697
|
exports.calendar = void 0;
|
|
3698
|
-
|
|
3698
|
+
/**
|
|
3699
|
+
* Returns a date with SQL format.
|
|
3700
|
+
*
|
|
3701
|
+
* @method dateSQL
|
|
3702
|
+
* @global
|
|
3703
|
+
*
|
|
3704
|
+
* @example
|
|
3705
|
+
* ``` javascript
|
|
3706
|
+
* //"2020-04-16 16:15:23"
|
|
3707
|
+
* let date = new Date();
|
|
3708
|
+
* bbn.fn.dateSQL(date,false);
|
|
3709
|
+
* ```
|
|
3710
|
+
*
|
|
3711
|
+
* @memberof bbn.fn
|
|
3712
|
+
* @param {Date|String} d
|
|
3713
|
+
* @param {String | false} wrong_result Whether or not include the time in the date
|
|
3714
|
+
* @returns {String}
|
|
3715
|
+
*/
|
|
3699
3716
|
const calendar = function (d, wrong_result = false) {
|
|
3700
3717
|
if (undefined === dayjs_min_js_1.default) {
|
|
3701
3718
|
return (0, fdate_js_1.fdate)(d, wrong_result);
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a date with SQL format.
|
|
3
|
+
*
|
|
4
|
+
* @method dateSQL
|
|
5
|
+
* @global
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ``` javascript
|
|
9
|
+
* //"2020-04-16 16:15:23"
|
|
10
|
+
* let date = new Date();
|
|
11
|
+
* bbn.fn.dateSQL(date,false);
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* @memberof bbn.fn
|
|
15
|
+
* @param {Date|String} d
|
|
16
|
+
* @param {String | false} wrong_result Whether or not include the time in the date
|
|
17
|
+
* @returns {String}
|
|
18
|
+
*/
|
|
1
19
|
declare const calendar: (d: any, wrong_result?: boolean) => any;
|
|
2
20
|
export { calendar };
|
|
@@ -3,7 +3,24 @@ import { fdate } from "./fdate.js";
|
|
|
3
3
|
import { date } from "./date.js";
|
|
4
4
|
import { isDate } from "../type/isDate.js";
|
|
5
5
|
import { isString } from "../type/isString.js";
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Returns a date with SQL format.
|
|
8
|
+
*
|
|
9
|
+
* @method dateSQL
|
|
10
|
+
* @global
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ``` javascript
|
|
14
|
+
* //"2020-04-16 16:15:23"
|
|
15
|
+
* let date = new Date();
|
|
16
|
+
* bbn.fn.dateSQL(date,false);
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @memberof bbn.fn
|
|
20
|
+
* @param {Date|String} d
|
|
21
|
+
* @param {String | false} wrong_result Whether or not include the time in the date
|
|
22
|
+
* @returns {String}
|
|
23
|
+
*/
|
|
7
24
|
const calendar = function (d, wrong_result = false) {
|
|
8
25
|
if (undefined === dayjs) {
|
|
9
26
|
return fdate(d, wrong_result);
|