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