amis-formula 1.2.4 → 1.2.8
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/README.md +1 -1
- package/dist/doc.js +302 -51
- package/dist/doc.md +216 -56
- package/dist/evalutor.d.ts +211 -50
- package/dist/index.js +1468 -52
- package/package.json +1 -1
package/dist/evalutor.d.ts
CHANGED
|
@@ -264,7 +264,8 @@ export declare class Evaluator {
|
|
|
264
264
|
*
|
|
265
265
|
* @example IFS(condition1, result1, condition2, result2,...conditionN, resultN)
|
|
266
266
|
* @param {...any} args - 条件,返回值集合
|
|
267
|
-
* @
|
|
267
|
+
* @namespace 逻辑函数
|
|
268
|
+
* @returns {any} 第一个满足条件的结果,没有命中的返回 false。
|
|
268
269
|
*/
|
|
269
270
|
fnIFS(...args: Array<() => any>): any;
|
|
270
271
|
/**
|
|
@@ -274,7 +275,7 @@ export declare class Evaluator {
|
|
|
274
275
|
* @param {number} num - 数值
|
|
275
276
|
* @namespace 数学函数
|
|
276
277
|
*
|
|
277
|
-
* @returns {number}
|
|
278
|
+
* @returns {number} 传入数值的绝对值
|
|
278
279
|
*/
|
|
279
280
|
fnABS(a: number): number;
|
|
280
281
|
/**
|
|
@@ -284,7 +285,7 @@ export declare class Evaluator {
|
|
|
284
285
|
* @param {...number} num - 数值
|
|
285
286
|
* @namespace 数学函数
|
|
286
287
|
*
|
|
287
|
-
* @returns {number}
|
|
288
|
+
* @returns {number} 所有传入值中最大的那个
|
|
288
289
|
*/
|
|
289
290
|
fnMAX(...args: Array<any>): any;
|
|
290
291
|
/**
|
|
@@ -294,7 +295,7 @@ export declare class Evaluator {
|
|
|
294
295
|
* @param {...number} num - 数值
|
|
295
296
|
* @namespace 数学函数
|
|
296
297
|
*
|
|
297
|
-
* @returns {number}
|
|
298
|
+
* @returns {number} 所有传入值中最小的那个
|
|
298
299
|
*/
|
|
299
300
|
fnMIN(...args: Array<number>): any;
|
|
300
301
|
/**
|
|
@@ -304,7 +305,7 @@ export declare class Evaluator {
|
|
|
304
305
|
* @param {...number} num - 数值
|
|
305
306
|
* @namespace 数学函数
|
|
306
307
|
*
|
|
307
|
-
* @returns {number}
|
|
308
|
+
* @returns {number} 所有传入数值的总和
|
|
308
309
|
*/
|
|
309
310
|
fnSUM(...args: Array<number>): any;
|
|
310
311
|
/**
|
|
@@ -314,7 +315,7 @@ export declare class Evaluator {
|
|
|
314
315
|
* @param {number} num - 数值
|
|
315
316
|
* @namespace 数学函数
|
|
316
317
|
*
|
|
317
|
-
* @returns {number}
|
|
318
|
+
* @returns {number} 数值对应的整形
|
|
318
319
|
*/
|
|
319
320
|
fnINT(n: number): number;
|
|
320
321
|
/**
|
|
@@ -325,7 +326,7 @@ export declare class Evaluator {
|
|
|
325
326
|
* @param {number} divisor - 除数
|
|
326
327
|
* @namespace 数学函数
|
|
327
328
|
*
|
|
328
|
-
* @returns {number}
|
|
329
|
+
* @returns {number} 两数相除的余数
|
|
329
330
|
*/
|
|
330
331
|
fnMOD(a: number, b: number): number;
|
|
331
332
|
/**
|
|
@@ -334,7 +335,7 @@ export declare class Evaluator {
|
|
|
334
335
|
* @example PI()
|
|
335
336
|
* @namespace 数学函数
|
|
336
337
|
*
|
|
337
|
-
* @returns {number}
|
|
338
|
+
* @returns {number} 圆周率数值
|
|
338
339
|
*/
|
|
339
340
|
fnPI(): number;
|
|
340
341
|
/**
|
|
@@ -345,7 +346,7 @@ export declare class Evaluator {
|
|
|
345
346
|
* @param {number} numDigits - 小数位数
|
|
346
347
|
* @namespace 数学函数
|
|
347
348
|
*
|
|
348
|
-
* @returns {number}
|
|
349
|
+
* @returns {number} 传入数值四舍五入后的结果
|
|
349
350
|
*/
|
|
350
351
|
fnROUND(a: number, b: number): number;
|
|
351
352
|
/**
|
|
@@ -356,7 +357,7 @@ export declare class Evaluator {
|
|
|
356
357
|
* @param {number} numDigits - 小数位数
|
|
357
358
|
* @namespace 数学函数
|
|
358
359
|
*
|
|
359
|
-
* @returns {number}
|
|
360
|
+
* @returns {number} 传入数值向下取整后的结果
|
|
360
361
|
*/
|
|
361
362
|
fnFLOOR(a: number, b: number): number;
|
|
362
363
|
/**
|
|
@@ -367,7 +368,7 @@ export declare class Evaluator {
|
|
|
367
368
|
* @param {number} numDigits - 小数位数
|
|
368
369
|
* @namespace 数学函数
|
|
369
370
|
*
|
|
370
|
-
* @returns {number}
|
|
371
|
+
* @returns {number} 传入数值向上取整后的结果
|
|
371
372
|
*/
|
|
372
373
|
fnCEIL(a: number, b: number): number;
|
|
373
374
|
/**
|
|
@@ -377,7 +378,7 @@ export declare class Evaluator {
|
|
|
377
378
|
* @param {number} num - 要处理的数字
|
|
378
379
|
* @namespace 数学函数
|
|
379
380
|
*
|
|
380
|
-
* @returns {number}
|
|
381
|
+
* @returns {number} 开平方的结果
|
|
381
382
|
*/
|
|
382
383
|
fnSQRT(n: number): number;
|
|
383
384
|
/**
|
|
@@ -387,9 +388,50 @@ export declare class Evaluator {
|
|
|
387
388
|
* @param {...number} num - 要处理的数字
|
|
388
389
|
* @namespace 数学函数
|
|
389
390
|
*
|
|
390
|
-
* @returns {number}
|
|
391
|
+
* @returns {number} 所有数值的平均值
|
|
391
392
|
*/
|
|
392
393
|
fnAVG(...args: Array<any>): number;
|
|
394
|
+
/**
|
|
395
|
+
* 返回数据点与数据均值点之差(数据偏差)的平方和
|
|
396
|
+
*
|
|
397
|
+
* @example DEVSQ(num1, num2, ...numN)
|
|
398
|
+
* @param {...number} num - 要处理的数字
|
|
399
|
+
* @namespace 数学函数
|
|
400
|
+
*
|
|
401
|
+
* @returns {number} 所有数值的平均值
|
|
402
|
+
*/
|
|
403
|
+
fnDEVSQ(...args: Array<any>): number | null;
|
|
404
|
+
/**
|
|
405
|
+
* 数据点到其算术平均值的绝对偏差的平均值
|
|
406
|
+
*
|
|
407
|
+
* @example AVEDEV(num1, num2, ...numN)
|
|
408
|
+
* @param {...number} num - 要处理的数字
|
|
409
|
+
* @namespace 数学函数
|
|
410
|
+
*
|
|
411
|
+
* @returns {number} 所有数值的平均值
|
|
412
|
+
*/
|
|
413
|
+
fnAVEDEV(...args: Array<any>): number | null;
|
|
414
|
+
/**
|
|
415
|
+
* 数据点的调和平均值
|
|
416
|
+
*
|
|
417
|
+
* @example HARMEAN(num1, num2, ...numN)
|
|
418
|
+
* @param {...number} num - 要处理的数字
|
|
419
|
+
* @namespace 数学函数
|
|
420
|
+
*
|
|
421
|
+
* @returns {number} 所有数值的平均值
|
|
422
|
+
*/
|
|
423
|
+
fnHARMEAN(...args: Array<any>): number | null;
|
|
424
|
+
/**
|
|
425
|
+
* 数据集中第 k 个最大值
|
|
426
|
+
*
|
|
427
|
+
* @example LARGE(array, k)
|
|
428
|
+
* @param {array} nums - 要处理的数字
|
|
429
|
+
* @param {number} k - 第几大
|
|
430
|
+
* @namespace 数学函数
|
|
431
|
+
*
|
|
432
|
+
* @returns {number} 所有数值的平均值
|
|
433
|
+
*/
|
|
434
|
+
fnLARGE(nums: Array<any>, k: number): any;
|
|
393
435
|
/**
|
|
394
436
|
* 将数值转为中文大写金额
|
|
395
437
|
*
|
|
@@ -397,7 +439,7 @@ export declare class Evaluator {
|
|
|
397
439
|
* @param {number} num - 要处理的数字
|
|
398
440
|
* @namespace 数学函数
|
|
399
441
|
*
|
|
400
|
-
* @returns {string}
|
|
442
|
+
* @returns {string} 数值中文大写字符
|
|
401
443
|
*/
|
|
402
444
|
fnUPPERMONEY(n: number): string;
|
|
403
445
|
/**
|
|
@@ -410,7 +452,7 @@ export declare class Evaluator {
|
|
|
410
452
|
* @example RAND()
|
|
411
453
|
* @namespace 数学函数
|
|
412
454
|
*
|
|
413
|
-
* @returns {number}
|
|
455
|
+
* @returns {number} 随机数
|
|
414
456
|
*/
|
|
415
457
|
fnRAND(): number;
|
|
416
458
|
normalizeText(raw: any): string;
|
|
@@ -453,7 +495,7 @@ export declare class Evaluator {
|
|
|
453
495
|
* @param {string[]} textArr - 要处理的文本集合
|
|
454
496
|
* @namespace 文本函数
|
|
455
497
|
*
|
|
456
|
-
* @returns {number[]}
|
|
498
|
+
* @returns {number[]} 长度集合
|
|
457
499
|
*/
|
|
458
500
|
fnLENGTH(...args: any[]): any;
|
|
459
501
|
/**
|
|
@@ -463,7 +505,7 @@ export declare class Evaluator {
|
|
|
463
505
|
* @param {string} text - 要处理的文本
|
|
464
506
|
* @namespace 文本函数
|
|
465
507
|
*
|
|
466
|
-
* @returns {boolean}
|
|
508
|
+
* @returns {boolean} 判断结果
|
|
467
509
|
*/
|
|
468
510
|
fnISEMPTY(text: string): boolean;
|
|
469
511
|
/**
|
|
@@ -473,7 +515,7 @@ export declare class Evaluator {
|
|
|
473
515
|
* @param {...string} text - 文本集合
|
|
474
516
|
* @namespace 文本函数
|
|
475
517
|
*
|
|
476
|
-
* @returns {string}
|
|
518
|
+
* @returns {string} 连接后的文本
|
|
477
519
|
*/
|
|
478
520
|
fnCONCATENATE(...args: Array<any>): string;
|
|
479
521
|
/**
|
|
@@ -485,7 +527,7 @@ export declare class Evaluator {
|
|
|
485
527
|
* @param {number} code - 编码值
|
|
486
528
|
* @namespace 文本函数
|
|
487
529
|
*
|
|
488
|
-
* @returns {string}
|
|
530
|
+
* @returns {string} 指定位置的字符
|
|
489
531
|
*/
|
|
490
532
|
fnCHAR(code: number): string;
|
|
491
533
|
/**
|
|
@@ -495,7 +537,7 @@ export declare class Evaluator {
|
|
|
495
537
|
* @param {string} text - 文本
|
|
496
538
|
* @namespace 文本函数
|
|
497
539
|
*
|
|
498
|
-
* @returns {string}
|
|
540
|
+
* @returns {string} 结果文本
|
|
499
541
|
*/
|
|
500
542
|
fnLOWER(text: string): string;
|
|
501
543
|
/**
|
|
@@ -505,9 +547,89 @@ export declare class Evaluator {
|
|
|
505
547
|
* @param {string} text - 文本
|
|
506
548
|
* @namespace 文本函数
|
|
507
549
|
*
|
|
508
|
-
* @returns {string}
|
|
550
|
+
* @returns {string} 结果文本
|
|
509
551
|
*/
|
|
510
552
|
fnUPPER(text: string): string;
|
|
553
|
+
/**
|
|
554
|
+
* 将传入文本首字母转成大写
|
|
555
|
+
*
|
|
556
|
+
* @example UPPERFIRST(text)
|
|
557
|
+
* @param {string} text - 文本
|
|
558
|
+
* @namespace 文本函数
|
|
559
|
+
*
|
|
560
|
+
* @returns {string} 结果文本
|
|
561
|
+
*/
|
|
562
|
+
fnUPPERFIRST(text: string): string;
|
|
563
|
+
/**
|
|
564
|
+
* 向前补齐文本长度
|
|
565
|
+
*
|
|
566
|
+
* 示例 `PADSTART("6", 2, "0")`
|
|
567
|
+
*
|
|
568
|
+
* 返回 `06`
|
|
569
|
+
*
|
|
570
|
+
* @example PADSTART(text)
|
|
571
|
+
* @param {string} text - 文本
|
|
572
|
+
* @param {number} num - 目标长度
|
|
573
|
+
* @param {string} pad - 用于补齐的文本
|
|
574
|
+
* @namespace 文本函数
|
|
575
|
+
*
|
|
576
|
+
* @returns {string} 结果文本
|
|
577
|
+
*/
|
|
578
|
+
fnPADSTART(text: string, num: number, pad: string): string;
|
|
579
|
+
/**
|
|
580
|
+
* 将文本转成标题
|
|
581
|
+
*
|
|
582
|
+
* 示例 `CAPITALIZE("star")`
|
|
583
|
+
*
|
|
584
|
+
* 返回 `Star`
|
|
585
|
+
*
|
|
586
|
+
* @example CAPITALIZE(text)
|
|
587
|
+
* @param {string} text - 文本
|
|
588
|
+
* @namespace 文本函数
|
|
589
|
+
*
|
|
590
|
+
* @returns {string} 结果文本
|
|
591
|
+
*/
|
|
592
|
+
fnCAPITALIZE(text: string): string;
|
|
593
|
+
/**
|
|
594
|
+
* 对文本进行 HTML 转义
|
|
595
|
+
*
|
|
596
|
+
* 示例 `ESCAPE("star")`
|
|
597
|
+
*
|
|
598
|
+
* 返回 `Star`
|
|
599
|
+
*
|
|
600
|
+
* @example ESCAPE(text)
|
|
601
|
+
* @param {string} text - 文本
|
|
602
|
+
* @namespace 文本函数
|
|
603
|
+
*
|
|
604
|
+
* @returns {string} 结果文本
|
|
605
|
+
*/
|
|
606
|
+
fnESCAPE(text: string): string;
|
|
607
|
+
/**
|
|
608
|
+
* 对文本长度进行截断
|
|
609
|
+
*
|
|
610
|
+
* 示例 `TRUNCATE("amis.baidu.com", 6)`
|
|
611
|
+
*
|
|
612
|
+
* 返回 `amis...`
|
|
613
|
+
*
|
|
614
|
+
* @example TRUNCATE(text, 6)
|
|
615
|
+
* @param {string} text - 文本
|
|
616
|
+
* @param {number} text - 最长长度
|
|
617
|
+
* @namespace 文本函数
|
|
618
|
+
*
|
|
619
|
+
* @returns {string} 结果文本
|
|
620
|
+
*/
|
|
621
|
+
fnTRUNCATE(text: string, length: number): string;
|
|
622
|
+
/**
|
|
623
|
+
* 取在某个分隔符之前的所有字符串
|
|
624
|
+
*
|
|
625
|
+
* @example BEFORELAST(text, '.')
|
|
626
|
+
* @param {string} text - 文本
|
|
627
|
+
* @param {string} delimiter - 结束文本
|
|
628
|
+
* @namespace 文本函数
|
|
629
|
+
*
|
|
630
|
+
* @returns {string} 判断结果
|
|
631
|
+
*/
|
|
632
|
+
fnBEFORELAST(text: string, delimiter?: string): string;
|
|
511
633
|
/**
|
|
512
634
|
* 将文本根据指定片段分割成数组
|
|
513
635
|
*
|
|
@@ -520,7 +642,7 @@ export declare class Evaluator {
|
|
|
520
642
|
* @param {string} delimiter - 文本片段
|
|
521
643
|
* @namespace 文本函数
|
|
522
644
|
*
|
|
523
|
-
* @returns {Array<string>}
|
|
645
|
+
* @returns {Array<string>} 文本集
|
|
524
646
|
*/
|
|
525
647
|
fnSPLIT(text: string, sep?: string): string[];
|
|
526
648
|
/**
|
|
@@ -530,9 +652,37 @@ export declare class Evaluator {
|
|
|
530
652
|
* @param {string} text - 文本
|
|
531
653
|
* @namespace 文本函数
|
|
532
654
|
*
|
|
533
|
-
* @returns {string}
|
|
655
|
+
* @returns {string} 处理后的文本
|
|
534
656
|
*/
|
|
535
657
|
fnTRIM(text: string): string;
|
|
658
|
+
/**
|
|
659
|
+
* 去除文本中的 HTML 标签
|
|
660
|
+
*
|
|
661
|
+
* 示例:`STRIPTAG("<b>amis</b>")`
|
|
662
|
+
*
|
|
663
|
+
* 返回:`amis`
|
|
664
|
+
*
|
|
665
|
+
* @example STRIPTAG(text)
|
|
666
|
+
* @param {string} text - 文本
|
|
667
|
+
* @namespace 文本函数
|
|
668
|
+
*
|
|
669
|
+
* @returns {string} 处理后的文本
|
|
670
|
+
*/
|
|
671
|
+
fnSTRIPTAG(text: string): string;
|
|
672
|
+
/**
|
|
673
|
+
* 将字符串中的换行转成 HTML `<br>`,用于简单换行的场景
|
|
674
|
+
*
|
|
675
|
+
* 示例:`LINEBREAK("\n")`
|
|
676
|
+
*
|
|
677
|
+
* 返回:`<br/>`
|
|
678
|
+
*
|
|
679
|
+
* @example LINEBREAK(text)
|
|
680
|
+
* @param {string} text - 文本
|
|
681
|
+
* @namespace 文本函数
|
|
682
|
+
*
|
|
683
|
+
* @returns {string} 处理后的文本
|
|
684
|
+
*/
|
|
685
|
+
fnLINEBREAK(text: string): string;
|
|
536
686
|
/**
|
|
537
687
|
* 判断字符串(text)是否以特定字符串(startString)开始,是则返回 True,否则返回 False
|
|
538
688
|
*
|
|
@@ -541,9 +691,20 @@ export declare class Evaluator {
|
|
|
541
691
|
* @param {string} startString - 起始文本
|
|
542
692
|
* @namespace 文本函数
|
|
543
693
|
*
|
|
544
|
-
* @returns {string}
|
|
694
|
+
* @returns {string} 判断结果
|
|
545
695
|
*/
|
|
546
696
|
fnSTARTSWITH(text: string, search: string): boolean;
|
|
697
|
+
/**
|
|
698
|
+
* 判断字符串(text)是否以特定字符串(endString)结束,是则返回 True,否则返回 False
|
|
699
|
+
*
|
|
700
|
+
* @example ENDSWITH(text, '片段')
|
|
701
|
+
* @param {string} text - 文本
|
|
702
|
+
* @param {string} endString - 结束文本
|
|
703
|
+
* @namespace 文本函数
|
|
704
|
+
*
|
|
705
|
+
* @returns {string} 判断结果
|
|
706
|
+
*/
|
|
707
|
+
fnENDSWITH(text: string, search: string): boolean;
|
|
547
708
|
/**
|
|
548
709
|
* 判断参数 1 中的文本是否包含参数 2 中的文本。
|
|
549
710
|
*
|
|
@@ -552,7 +713,7 @@ export declare class Evaluator {
|
|
|
552
713
|
* @param {string} searchText - 搜索文本
|
|
553
714
|
* @namespace 文本函数
|
|
554
715
|
*
|
|
555
|
-
* @returns {string}
|
|
716
|
+
* @returns {string} 判断结果
|
|
556
717
|
*/
|
|
557
718
|
fnCONTAINS(text: string, search: string): boolean;
|
|
558
719
|
/**
|
|
@@ -564,7 +725,7 @@ export declare class Evaluator {
|
|
|
564
725
|
* @param {string} replace - 要替换的文本
|
|
565
726
|
* @namespace 文本函数
|
|
566
727
|
*
|
|
567
|
-
* @returns {string}
|
|
728
|
+
* @returns {string} 处理结果
|
|
568
729
|
*/
|
|
569
730
|
fnREPLACE(text: string, search: string, replace: string): string;
|
|
570
731
|
/**
|
|
@@ -576,7 +737,7 @@ export declare class Evaluator {
|
|
|
576
737
|
* @param {number} start - 起始位置
|
|
577
738
|
* @namespace 文本函数
|
|
578
739
|
*
|
|
579
|
-
* @returns {number}
|
|
740
|
+
* @returns {number} 命中的位置
|
|
580
741
|
*/
|
|
581
742
|
fnSEARCH(text: string, search: string, start?: number): number;
|
|
582
743
|
/**
|
|
@@ -588,7 +749,7 @@ export declare class Evaluator {
|
|
|
588
749
|
* @param {number} len - 处理长度
|
|
589
750
|
* @namespace 文本函数
|
|
590
751
|
*
|
|
591
|
-
* @returns {number}
|
|
752
|
+
* @returns {number} 命中的位置
|
|
592
753
|
*/
|
|
593
754
|
fnMID(text: string, from: number, len: number): string;
|
|
594
755
|
/**
|
|
@@ -601,7 +762,7 @@ export declare class Evaluator {
|
|
|
601
762
|
* @example DATE('2021-12-06 08:20:00')
|
|
602
763
|
* @namespace 日期函数
|
|
603
764
|
*
|
|
604
|
-
* @returns {Date}
|
|
765
|
+
* @returns {Date} 日期对象
|
|
605
766
|
*/
|
|
606
767
|
fnDATE(year: number, month: number, day: number, hour: number, minute: number, second: number): Date;
|
|
607
768
|
/**
|
|
@@ -612,7 +773,7 @@ export declare class Evaluator {
|
|
|
612
773
|
* @param {date} date 日期对象
|
|
613
774
|
* @param {string} format 时间戳格式,带毫秒传入 'x'。默认为 'X' 不带毫秒的。
|
|
614
775
|
*
|
|
615
|
-
* @returns {number}
|
|
776
|
+
* @returns {number} 时间戳
|
|
616
777
|
*/
|
|
617
778
|
fnTIMESTAMP(date: Date, format?: 'x' | 'X'): number;
|
|
618
779
|
/**
|
|
@@ -621,7 +782,7 @@ export declare class Evaluator {
|
|
|
621
782
|
* @example TODAY()
|
|
622
783
|
* @namespace 日期函数
|
|
623
784
|
*
|
|
624
|
-
* @returns {number}
|
|
785
|
+
* @returns {number} 日期
|
|
625
786
|
*/
|
|
626
787
|
fnTODAY(): Date;
|
|
627
788
|
/**
|
|
@@ -630,7 +791,7 @@ export declare class Evaluator {
|
|
|
630
791
|
* @example NOW()
|
|
631
792
|
* @namespace 日期函数
|
|
632
793
|
*
|
|
633
|
-
* @returns {number}
|
|
794
|
+
* @returns {number} 日期
|
|
634
795
|
*/
|
|
635
796
|
fnNOW(): Date;
|
|
636
797
|
/**
|
|
@@ -641,7 +802,7 @@ export declare class Evaluator {
|
|
|
641
802
|
* @param {date} date 日期对象
|
|
642
803
|
* @param {string} format 日期格式,默认为 "YYYY-MM-DD HH:mm:ss"
|
|
643
804
|
*
|
|
644
|
-
* @returns {number}
|
|
805
|
+
* @returns {number} 日期字符串
|
|
645
806
|
*/
|
|
646
807
|
fnDATETOSTR(date: Date, format?: string): string;
|
|
647
808
|
/**
|
|
@@ -669,7 +830,7 @@ export declare class Evaluator {
|
|
|
669
830
|
* @namespace 日期函数
|
|
670
831
|
* @example YEAR(date)
|
|
671
832
|
* @param {date} date 日期对象
|
|
672
|
-
* @returns {number}
|
|
833
|
+
* @returns {number} 数值
|
|
673
834
|
*/
|
|
674
835
|
fnYEAR(date: Date): number;
|
|
675
836
|
/**
|
|
@@ -678,7 +839,7 @@ export declare class Evaluator {
|
|
|
678
839
|
* @namespace 日期函数
|
|
679
840
|
* @example MONTH(date)
|
|
680
841
|
* @param {date} date 日期对象
|
|
681
|
-
* @returns {number}
|
|
842
|
+
* @returns {number} 数值
|
|
682
843
|
*/
|
|
683
844
|
fnMONTH(date: Date): number;
|
|
684
845
|
/**
|
|
@@ -686,7 +847,7 @@ export declare class Evaluator {
|
|
|
686
847
|
* @namespace 日期函数
|
|
687
848
|
* @example DAY(date)
|
|
688
849
|
* @param {date} date 日期对象
|
|
689
|
-
* @returns {number}
|
|
850
|
+
* @returns {number} 数值
|
|
690
851
|
*/
|
|
691
852
|
fnDAY(date: Date): number;
|
|
692
853
|
/**
|
|
@@ -694,7 +855,7 @@ export declare class Evaluator {
|
|
|
694
855
|
* @param {date} date 日期对象
|
|
695
856
|
* @namespace 日期函数
|
|
696
857
|
* @example HOUR(date)
|
|
697
|
-
* @returns {number}
|
|
858
|
+
* @returns {number} 数值
|
|
698
859
|
*/
|
|
699
860
|
fnHOUR(date: Date): number;
|
|
700
861
|
/**
|
|
@@ -702,7 +863,7 @@ export declare class Evaluator {
|
|
|
702
863
|
* @param {date} date 日期对象
|
|
703
864
|
* @namespace 日期函数
|
|
704
865
|
* @example MINUTE(date)
|
|
705
|
-
* @returns {number}
|
|
866
|
+
* @returns {number} 数值
|
|
706
867
|
*/
|
|
707
868
|
fnMINUTE(date: Date): number;
|
|
708
869
|
/**
|
|
@@ -710,7 +871,7 @@ export declare class Evaluator {
|
|
|
710
871
|
* @param {date} date 日期对象
|
|
711
872
|
* @namespace 日期函数
|
|
712
873
|
* @example SECOND(date)
|
|
713
|
-
* @returns {number}
|
|
874
|
+
* @returns {number} 数值
|
|
714
875
|
*/
|
|
715
876
|
fnSECOND(date: Date): number;
|
|
716
877
|
/**
|
|
@@ -719,7 +880,7 @@ export declare class Evaluator {
|
|
|
719
880
|
* @param {date} startDate 日期对象
|
|
720
881
|
* @namespace 日期函数
|
|
721
882
|
* @example YEARS(endDate, startDate)
|
|
722
|
-
* @returns {number}
|
|
883
|
+
* @returns {number} 数值
|
|
723
884
|
*/
|
|
724
885
|
fnYEARS(endDate: Date, startDate: Date): number;
|
|
725
886
|
/**
|
|
@@ -728,7 +889,7 @@ export declare class Evaluator {
|
|
|
728
889
|
* @param {date} startDate 日期对象
|
|
729
890
|
* @namespace 日期函数
|
|
730
891
|
* @example MINUTES(endDate, startDate)
|
|
731
|
-
* @returns {number}
|
|
892
|
+
* @returns {number} 数值
|
|
732
893
|
*/
|
|
733
894
|
fnMINUTES(endDate: Date, startDate: Date): number;
|
|
734
895
|
/**
|
|
@@ -737,7 +898,7 @@ export declare class Evaluator {
|
|
|
737
898
|
* @param {date} startDate 日期对象
|
|
738
899
|
* @namespace 日期函数
|
|
739
900
|
* @example DAYS(endDate, startDate)
|
|
740
|
-
* @returns {number}
|
|
901
|
+
* @returns {number} 数值
|
|
741
902
|
*/
|
|
742
903
|
fnDAYS(endDate: Date, startDate: Date): number;
|
|
743
904
|
/**
|
|
@@ -746,7 +907,7 @@ export declare class Evaluator {
|
|
|
746
907
|
* @param {date} startDate 日期对象
|
|
747
908
|
* @namespace 日期函数
|
|
748
909
|
* @example HOURS(endDate, startDate)
|
|
749
|
-
* @returns {number}
|
|
910
|
+
* @returns {number} 数值
|
|
750
911
|
*/
|
|
751
912
|
fnHOURS(endDate: Date, startDate: Date): number;
|
|
752
913
|
/**
|
|
@@ -763,7 +924,7 @@ export declare class Evaluator {
|
|
|
763
924
|
* @param {string} unit 单位:支持年、月、天等等
|
|
764
925
|
* @namespace 日期函数
|
|
765
926
|
* @example DATEMODIFY(date, 2, 'days')
|
|
766
|
-
* @returns {date}
|
|
927
|
+
* @returns {date} 日期对象
|
|
767
928
|
*/
|
|
768
929
|
fnDATEMODIFY(date: Date, num: number, format: any): Date;
|
|
769
930
|
/**
|
|
@@ -775,7 +936,7 @@ export declare class Evaluator {
|
|
|
775
936
|
* @param {string} format 日期格式
|
|
776
937
|
* @namespace 日期函数
|
|
777
938
|
* @example STRTODATE(value[, format=""])
|
|
778
|
-
* @returns {date}
|
|
939
|
+
* @returns {date} 日期对象
|
|
779
940
|
*/
|
|
780
941
|
fnSTRTODATE(value: any, format?: string): Date;
|
|
781
942
|
/**
|
|
@@ -786,7 +947,7 @@ export declare class Evaluator {
|
|
|
786
947
|
* @param {string} unit 单位,默认是 'day', 即之比较到天
|
|
787
948
|
* @namespace 日期函数
|
|
788
949
|
* @example ISBEFORE(a, b)
|
|
789
|
-
* @returns {boolean}
|
|
950
|
+
* @returns {boolean} 判断结果
|
|
790
951
|
*/
|
|
791
952
|
fnISBEFORE(a: Date, b: Date, unit?: any): boolean;
|
|
792
953
|
/**
|
|
@@ -797,7 +958,7 @@ export declare class Evaluator {
|
|
|
797
958
|
* @param {string} unit 单位,默认是 'day', 即之比较到天
|
|
798
959
|
* @namespace 日期函数
|
|
799
960
|
* @example ISAFTER(a, b)
|
|
800
|
-
* @returns {boolean}
|
|
961
|
+
* @returns {boolean} 判断结果
|
|
801
962
|
*/
|
|
802
963
|
fnISAFTER(a: Date, b: Date, unit?: any): boolean;
|
|
803
964
|
/**
|
|
@@ -808,7 +969,7 @@ export declare class Evaluator {
|
|
|
808
969
|
* @param {string} unit 单位,默认是 'day', 即之比较到天
|
|
809
970
|
* @namespace 日期函数
|
|
810
971
|
* @example ISSAMEORBEFORE(a, b)
|
|
811
|
-
* @returns {boolean}
|
|
972
|
+
* @returns {boolean} 判断结果
|
|
812
973
|
*/
|
|
813
974
|
fnISSAMEORBEFORE(a: Date, b: Date, unit?: any): boolean;
|
|
814
975
|
/**
|
|
@@ -819,7 +980,7 @@ export declare class Evaluator {
|
|
|
819
980
|
* @param {string} unit 单位,默认是 'day', 即之比较到天
|
|
820
981
|
* @namespace 日期函数
|
|
821
982
|
* @example ISSAMEORAFTER(a, b)
|
|
822
|
-
* @returns {boolean}
|
|
983
|
+
* @returns {boolean} 判断结果
|
|
823
984
|
*/
|
|
824
985
|
fnISSAMEORAFTER(a: Date, b: Date, unit?: any): boolean;
|
|
825
986
|
/**
|
|
@@ -828,7 +989,7 @@ export declare class Evaluator {
|
|
|
828
989
|
* @param {Array<any>} arr 数组
|
|
829
990
|
* @namespace 其他
|
|
830
991
|
* @example COUNT(arr)
|
|
831
|
-
* @returns {boolean}
|
|
992
|
+
* @returns {boolean} 结果
|
|
832
993
|
*/
|
|
833
994
|
fnCOUNT(value: any): number;
|
|
834
995
|
}
|