@cloudbase/cals 0.5.13-alpha.6 → 0.5.13-alpha.7
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.
|
@@ -247,7 +247,7 @@ function getUserInfo(): CurrentUserInfo;
|
|
|
247
247
|
* 登录用户信息
|
|
248
248
|
*
|
|
249
249
|
* @privateForWeDa
|
|
250
|
-
* {"group": "globalVar", "displayType": "object", "displayName": "登录用户信息"}
|
|
250
|
+
* {"group": "globalVar", "displayType": "object", "displayName": "登录用户信息", "schema": {"type":"object","properties":{"userId":{"type":"string","title":"用户 ID"},"phone":{"type":"string","title":"手机"},"type":{"type":"number","title":"用户类型"},"relatedRoles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","title":"角色 ID"},"envId":{"type":"string","title":"环境 ID"},"name":{"type":"string","title":"角色名称"},"roleIdentity":{"type":"string","title":"角色标识"}}},"title":"用户关联角色"},"openId":{"type":"string","title":"微信/企微 openId"},"name":{"type":"string","title":"用户名称"},"nickName":{"type":"string","title":"用户昵称"},"email":{"type":"string","title":"邮箱"},"mainOrg":{"type":"object","properties":{"id":{"type":"string","title":"主岗部门 ID"},"name":{"type":"string","title":"主岗部门名称"}},"title":"主岗部门"},"orgs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","title":"兼岗部门 ID"},"name":{"type":"string","title":"兼岗部门名称"}}},"title":"兼岗部门"}}}}
|
|
251
251
|
*/
|
|
252
252
|
const currentUser: CurrentUserInfo;
|
|
253
253
|
|
|
@@ -450,7 +450,7 @@ function navigateBack(options: navigateBackOptions);
|
|
|
450
450
|
* 计算传入数字的绝对值
|
|
451
451
|
*
|
|
452
452
|
* @privateForWeDa
|
|
453
|
-
* {"group": "formula", "displayType": "function", "displayName": "绝对值", "insertText": "ABS(1)"}
|
|
453
|
+
* {"group": "formula", "displayType": "function", "displayName": "绝对值", "insertText": "ABS(1)", "subGroup": "calculation"}
|
|
454
454
|
*/
|
|
455
455
|
function ABS(num: number): number;
|
|
456
456
|
/**
|
|
@@ -460,7 +460,7 @@ function navigateBack(options: navigateBackOptions);
|
|
|
460
460
|
* 返回一组数字中的最小值
|
|
461
461
|
*
|
|
462
462
|
* @privateForWeDa
|
|
463
|
-
* {"group": "formula", "displayType": "function", "displayName": "最小值", "insertText": "Min(1, 2)"}
|
|
463
|
+
* {"group": "formula", "displayType": "function", "displayName": "最小值", "insertText": "Min(1, 2)", "subGroup": "calculation"}
|
|
464
464
|
*/
|
|
465
465
|
function Min(...args: number[]): number;
|
|
466
466
|
/**
|
|
@@ -470,7 +470,7 @@ function navigateBack(options: navigateBackOptions);
|
|
|
470
470
|
* 返回一组数字中的最大值
|
|
471
471
|
*
|
|
472
472
|
* @privateForWeDa
|
|
473
|
-
* {"group": "formula", "displayType": "function", "displayName": "最大值", "insertText": "Max(1, 2)"}
|
|
473
|
+
* {"group": "formula", "displayType": "function", "displayName": "最大值", "insertText": "Max(1, 2)", "subGroup": "calculation"}
|
|
474
474
|
*/
|
|
475
475
|
function Max(...args: number[]): number;
|
|
476
476
|
/**
|
|
@@ -480,7 +480,7 @@ function navigateBack(options: navigateBackOptions);
|
|
|
480
480
|
* 返回一组数字中的平均值
|
|
481
481
|
*
|
|
482
482
|
* @privateForWeDa
|
|
483
|
-
* {"group": "formula", "displayType": "function", "displayName": "平均值", "insertText": "Average(1, 2)"}
|
|
483
|
+
* {"group": "formula", "displayType": "function", "displayName": "平均值", "insertText": "Average(1, 2)", "subGroup": "calculation"}
|
|
484
484
|
*/
|
|
485
485
|
function Average(...args: number[]): number;
|
|
486
486
|
/**
|
|
@@ -490,7 +490,7 @@ function navigateBack(options: navigateBackOptions);
|
|
|
490
490
|
* 返回传入数字向下取整的结果
|
|
491
491
|
*
|
|
492
492
|
* @privateForWeDa
|
|
493
|
-
* {"group": "formula", "displayType": "function", "displayName": "向下取整", "insertText": "Floor(1)"}
|
|
493
|
+
* {"group": "formula", "displayType": "function", "displayName": "向下取整", "insertText": "Floor(1)", "subGroup": "calculation"}
|
|
494
494
|
*/
|
|
495
495
|
function Floor(num: number): number;
|
|
496
496
|
/**
|
|
@@ -500,7 +500,7 @@ function navigateBack(options: navigateBackOptions);
|
|
|
500
500
|
* 返回传入数字向上取整的结果
|
|
501
501
|
*
|
|
502
502
|
* @privateForWeDa
|
|
503
|
-
* {"group": "formula", "displayType": "function", "displayName": "向上取整", "insertText": "Ceiling(1)"}
|
|
503
|
+
* {"group": "formula", "displayType": "function", "displayName": "向上取整", "insertText": "Ceiling(1)", "subGroup": "calculation"}
|
|
504
504
|
*/
|
|
505
505
|
function Ceiling(num: number): number;
|
|
506
506
|
/**
|
|
@@ -510,7 +510,7 @@ function navigateBack(options: navigateBackOptions);
|
|
|
510
510
|
* 返回传入数字四舍五入后的结果
|
|
511
511
|
*
|
|
512
512
|
* @privateForWeDa
|
|
513
|
-
* {"group": "formula", "displayType": "function", "displayName": "四舍五入", "insertText": "Round(1)"}
|
|
513
|
+
* {"group": "formula", "displayType": "function", "displayName": "四舍五入", "insertText": "Round(1)", "subGroup": "calculation"}
|
|
514
514
|
*/
|
|
515
515
|
function Round(num: number): number;
|
|
516
516
|
/**
|
|
@@ -520,7 +520,7 @@ function navigateBack(options: navigateBackOptions);
|
|
|
520
520
|
* 返回一组数字中的和
|
|
521
521
|
*
|
|
522
522
|
* @privateForWeDa
|
|
523
|
-
* {"group": "formula", "displayType": "function", "displayName": "求和", "insertText": "Sum(1, 2)"}
|
|
523
|
+
* {"group": "formula", "displayType": "function", "displayName": "求和", "insertText": "Sum(1, 2)", "subGroup": "calculation"}
|
|
524
524
|
*/
|
|
525
525
|
function Sum(...args: number[]): number;
|
|
526
526
|
/**
|
|
@@ -530,7 +530,7 @@ function navigateBack(options: navigateBackOptions);
|
|
|
530
530
|
* 返回一个指定范围的伪随机数,例如 Rand(10),返回一个范围在 10 以内的随机数
|
|
531
531
|
*
|
|
532
532
|
* @privateForWeDa
|
|
533
|
-
* {"group": "formula", "displayType": "function", "displayName": "随机数", "insertText": "Rand(1)"}
|
|
533
|
+
* {"group": "formula", "displayType": "function", "displayName": "随机数", "insertText": "Rand(1)", "subGroup": "calculation"}
|
|
534
534
|
*/
|
|
535
535
|
function Rand(num: number): number;
|
|
536
536
|
|
|
@@ -546,7 +546,7 @@ alternate?: any;
|
|
|
546
546
|
* 按判断条件进行逻辑比较,满足时返回一个值,不满足时返回另一个值。
|
|
547
547
|
*
|
|
548
548
|
* @privateForWeDa
|
|
549
|
-
* {"group": "formula", "displayType": "function", "displayName": "条件分支", "insertText": "If(true, '您好', 'hello')"}
|
|
549
|
+
* {"group": "formula", "displayType": "function", "displayName": "条件分支", "insertText": "If(true, '您好', 'hello')", "subGroup": "logic"}
|
|
550
550
|
*/
|
|
551
551
|
function If(data: IIfObjectParam): any;
|
|
552
552
|
function If(condition: boolean, consequent?: any, alternate?: any): any;
|
|
@@ -557,7 +557,7 @@ alternate?: any;
|
|
|
557
557
|
* 判断传入的文本是否为空
|
|
558
558
|
*
|
|
559
559
|
* @privateForWeDa
|
|
560
|
-
* {"group": "formula", "displayType": "function", "displayName": "是否为空", "insertText": "IsEmpty('hello')"}
|
|
560
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为空", "insertText": "IsEmpty('hello')", "subGroup": "logic"}
|
|
561
561
|
*/
|
|
562
562
|
function IsEmpty(text: string | string[]): boolean;
|
|
563
563
|
/**
|
|
@@ -567,7 +567,7 @@ alternate?: any;
|
|
|
567
567
|
* 判断传入的字段值是否包含数据,即不为 NULL
|
|
568
568
|
*
|
|
569
569
|
* @privateForWeDa
|
|
570
|
-
* {"group": "formula", "displayType": "function", "displayName": "是否为null", "insertText": "NotNull(null)"}
|
|
570
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为null", "insertText": "NotNull(null)", "subGroup": "logic"}
|
|
571
571
|
*/
|
|
572
572
|
function NotNull(val: any): boolean;
|
|
573
573
|
/**
|
|
@@ -577,7 +577,7 @@ alternate?: any;
|
|
|
577
577
|
* 用于确定所有判断条件是否为真
|
|
578
578
|
*
|
|
579
579
|
* @privateForWeDa
|
|
580
|
-
* {"group": "formula", "displayType": "function", "displayName": "与", "insertText": "And(true, false)"}
|
|
580
|
+
* {"group": "formula", "displayType": "function", "displayName": "与", "insertText": "And(true, false)", "subGroup": "logic"}
|
|
581
581
|
*/
|
|
582
582
|
function And(...args: boolean[]): boolean;
|
|
583
583
|
/**
|
|
@@ -587,7 +587,7 @@ alternate?: any;
|
|
|
587
587
|
* 任意一个判断条件为真,则结果为真;所有条件为否,结果才为否
|
|
588
588
|
*
|
|
589
589
|
* @privateForWeDa
|
|
590
|
-
* {"group": "formula", "displayType": "function", "displayName": "或", "insertText": "Or(true, false)"}
|
|
590
|
+
* {"group": "formula", "displayType": "function", "displayName": "或", "insertText": "Or(true, false)", "subGroup": "logic"}
|
|
591
591
|
*/
|
|
592
592
|
function Or(...args: boolean[]): boolean;
|
|
593
593
|
|
|
@@ -598,7 +598,7 @@ alternate?: any;
|
|
|
598
598
|
* 获取传入文本的字符数
|
|
599
599
|
*
|
|
600
600
|
* @privateForWeDa
|
|
601
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取文本长度", "insertText": "Len('文本')"}
|
|
601
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取文本长度", "insertText": "Len('文本')", "subGroup": "text"}
|
|
602
602
|
*/
|
|
603
603
|
function Len(text: string): number;
|
|
604
604
|
/**
|
|
@@ -608,7 +608,7 @@ alternate?: any;
|
|
|
608
608
|
* 判断文本 1 是否包含文本 2
|
|
609
609
|
*
|
|
610
610
|
* @privateForWeDa
|
|
611
|
-
* {"group": "formula", "displayType": "function", "displayName": "是否包含指定文本", "insertText": "Contains('文本1', '文本2')"}
|
|
611
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否包含指定文本", "insertText": "Contains('文本1', '文本2')", "subGroup": "text"}
|
|
612
612
|
*/
|
|
613
613
|
function Contains(text1: string, text2: string): boolean;
|
|
614
614
|
/**
|
|
@@ -618,7 +618,7 @@ alternate?: any;
|
|
|
618
618
|
* 根据传入的文本 2,将文本 1 拆分成文本数组,例如 Split("张三,李四,王五", ",")
|
|
619
619
|
*
|
|
620
620
|
* @privateForWeDa
|
|
621
|
-
* {"group": "formula", "displayType": "function", "displayName": "拆分文本", "insertText": "Split('文本1', '文本2')"}
|
|
621
|
+
* {"group": "formula", "displayType": "function", "displayName": "拆分文本", "insertText": "Split('文本1', '文本2')", "subGroup": "text"}
|
|
622
622
|
*/
|
|
623
623
|
function Split(text1: string, text2: string): string[];
|
|
624
624
|
/**
|
|
@@ -628,7 +628,7 @@ alternate?: any;
|
|
|
628
628
|
* 删除文本开头和结尾的所有空格和制表符,文本中间的空格和制表符不会删除
|
|
629
629
|
*
|
|
630
630
|
* @privateForWeDa
|
|
631
|
-
* {"group": "formula", "displayType": "function", "displayName": "删除开头/结尾空格和制表符", "insertText": "Trim('文本')"}
|
|
631
|
+
* {"group": "formula", "displayType": "function", "displayName": "删除开头/结尾空格和制表符", "insertText": "Trim('文本')", "subGroup": "text"}
|
|
632
632
|
*/
|
|
633
633
|
function Trim(text: string): string;
|
|
634
634
|
/**
|
|
@@ -638,7 +638,7 @@ alternate?: any;
|
|
|
638
638
|
* 将传入的文本转为全大写文本
|
|
639
639
|
*
|
|
640
640
|
* @privateForWeDa
|
|
641
|
-
* {"group": "formula", "displayType": "function", "displayName": "转换为大写", "insertText": "Upper('文本')"}
|
|
641
|
+
* {"group": "formula", "displayType": "function", "displayName": "转换为大写", "insertText": "Upper('文本')", "subGroup": "text"}
|
|
642
642
|
*/
|
|
643
643
|
function Upper(text: string): string;
|
|
644
644
|
/**
|
|
@@ -648,26 +648,17 @@ alternate?: any;
|
|
|
648
648
|
* 将传入的文本转为全小写文本
|
|
649
649
|
*
|
|
650
650
|
* @privateForWeDa
|
|
651
|
-
* {"group": "formula", "displayType": "function", "displayName": "转换为小写", "insertText": "Lower('文本')"}
|
|
651
|
+
* {"group": "formula", "displayType": "function", "displayName": "转换为小写", "insertText": "Lower('文本')", "subGroup": "text"}
|
|
652
652
|
*/
|
|
653
653
|
function Lower(text: string): string;
|
|
654
654
|
/**
|
|
655
|
-
* 转换为文本
|
|
656
|
-
*
|
|
657
|
-
* @remarks
|
|
658
|
-
* 将数字、时间日期等转换为文本
|
|
659
|
-
*
|
|
660
|
-
* @privateForWeDa
|
|
661
|
-
* {"group": "formula", "displayType": "function", "displayName": "转换为文本"}
|
|
662
|
-
*/
|
|
663
|
-
/**
|
|
664
655
|
* 文本拼接
|
|
665
656
|
*
|
|
666
657
|
* @remarks
|
|
667
658
|
* 返回多个文本拼接后的新文本
|
|
668
659
|
*
|
|
669
660
|
* @privateForWeDa
|
|
670
|
-
* {"group": "formula", "displayType": "function", "displayName": "文本拼接", "insertText": "Concat('文本1', '文本2')"}
|
|
661
|
+
* {"group": "formula", "displayType": "function", "displayName": "文本拼接", "insertText": "Concat('文本1', '文本2')", "subGroup": "text"}
|
|
671
662
|
*/
|
|
672
663
|
function Concat(...text: string[]): string;
|
|
673
664
|
|
|
@@ -678,7 +669,7 @@ alternate?: any;
|
|
|
678
669
|
* 返回当前系统时间,通常与其他日期时间函数搭配使用
|
|
679
670
|
*
|
|
680
671
|
* @privateForWeDa
|
|
681
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取现在时间", "insertText": "Now()"}
|
|
672
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取现在时间", "insertText": "Now()", "subGroup": "time"}
|
|
682
673
|
*/
|
|
683
674
|
function Now(): number;
|
|
684
675
|
/**
|
|
@@ -688,7 +679,7 @@ alternate?: any;
|
|
|
688
679
|
* 根据输入的日期时间返回时间戳
|
|
689
680
|
*
|
|
690
681
|
* @privateForWeDa
|
|
691
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取时间戳", "insertText": "Timestamp(1661334203345)"}
|
|
682
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取时间戳", "insertText": "Timestamp(1661334203345)", "subGroup": "time"}
|
|
692
683
|
*/
|
|
693
684
|
function Timestamp(arg: number | string | Date): number;
|
|
694
685
|
/**
|
|
@@ -698,7 +689,7 @@ alternate?: any;
|
|
|
698
689
|
* 根据输入的日期时间返回该时间的秒数
|
|
699
690
|
*
|
|
700
691
|
* @privateForWeDa
|
|
701
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取秒数", "insertText": "Second(1661334203345)"}
|
|
692
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取秒数", "insertText": "Second(1661334203345)", "subGroup": "time"}
|
|
702
693
|
*/
|
|
703
694
|
function Second(arg: number | string | Date): number;
|
|
704
695
|
/**
|
|
@@ -708,7 +699,7 @@ alternate?: any;
|
|
|
708
699
|
* 根据输入的日期时间返回该时间的分钟部分
|
|
709
700
|
*
|
|
710
701
|
* @privateForWeDa
|
|
711
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取分钟数", "insertText": "Minute(1661334203345)"}
|
|
702
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取分钟数", "insertText": "Minute(1661334203345)", "subGroup": "time"}
|
|
712
703
|
*/
|
|
713
704
|
function Minute(arg: number | string | Date): number;
|
|
714
705
|
/**
|
|
@@ -718,7 +709,7 @@ alternate?: any;
|
|
|
718
709
|
* 根据输入的日期时间返回该时间的小时部分,24小时制
|
|
719
710
|
*
|
|
720
711
|
* @privateForWeDa
|
|
721
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取小时数", "insertText": "Hour(1661334203345)"}
|
|
712
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取小时数", "insertText": "Hour(1661334203345)", "subGroup": "time"}
|
|
722
713
|
*/
|
|
723
714
|
function Hour(arg: number | string | Date): number;
|
|
724
715
|
/**
|
|
@@ -728,7 +719,7 @@ alternate?: any;
|
|
|
728
719
|
* 根据输入的日期时间返回该时间的日部分,范围为 1-31
|
|
729
720
|
*
|
|
730
721
|
* @privateForWeDa
|
|
731
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取天数", "insertText": "Day(1661334203345)"}
|
|
722
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取天数", "insertText": "Day(1661334203345)", "subGroup": "time"}
|
|
732
723
|
*/
|
|
733
724
|
function Day(arg: number | string | Date): number;
|
|
734
725
|
/**
|
|
@@ -738,7 +729,7 @@ alternate?: any;
|
|
|
738
729
|
* 根据输入的日期时间返回该时间的星期数
|
|
739
730
|
*
|
|
740
731
|
* @privateForWeDa
|
|
741
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取星期数", "insertText": "DayOfWeek(1661334203345)"}
|
|
732
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取星期数", "insertText": "DayOfWeek(1661334203345)", "subGroup": "time"}
|
|
742
733
|
*/
|
|
743
734
|
function DayOfWeek(arg: number | string | Date): number;
|
|
744
735
|
/**
|
|
@@ -748,7 +739,7 @@ alternate?: any;
|
|
|
748
739
|
* 根据输入的日期时间返回该时间的月份
|
|
749
740
|
*
|
|
750
741
|
* @privateForWeDa
|
|
751
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取月数", "insertText": "Month(1661334203345)"}
|
|
742
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取月数", "insertText": "Month(1661334203345)", "subGroup": "time"}
|
|
752
743
|
*/
|
|
753
744
|
function Month(arg: number | string | Date): number;
|
|
754
745
|
/**
|
|
@@ -758,7 +749,7 @@ alternate?: any;
|
|
|
758
749
|
* 根据输入的日期时间返回该时间的年份
|
|
759
750
|
*
|
|
760
751
|
* @privateForWeDa
|
|
761
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取年份", "insertText": "Year(1661334203345)"}
|
|
752
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取年份", "insertText": "Year(1661334203345)", "subGroup": "time"}
|
|
762
753
|
*/
|
|
763
754
|
function Year(arg: number | string | Date): number;
|
|
764
755
|
/**
|
|
@@ -768,26 +759,17 @@ alternate?: any;
|
|
|
768
759
|
* 根据输入的年月日数值返回一个日期类型的数据,例如 GetDate(2017,3,24)
|
|
769
760
|
*
|
|
770
761
|
* @privateForWeDa
|
|
771
|
-
* {"group": "formula", "displayType": "function", "displayName": "使用年月日创建日期时间", "insertText": "GetDate(2011, 7, 2)"}
|
|
762
|
+
* {"group": "formula", "displayType": "function", "displayName": "使用年月日创建日期时间", "insertText": "GetDate(2011, 7, 2)", "subGroup": "time"}
|
|
772
763
|
*/
|
|
773
764
|
function GetDate(year: number, month: number, day: number): number;
|
|
774
765
|
/**
|
|
775
|
-
* 使用时间戳创建日期时间
|
|
776
|
-
*
|
|
777
|
-
* @remarks
|
|
778
|
-
* 将日期时间文本根据指定格式转化为日期时间,例如 DateTimeValue("2021-12-11 01:19:12", "yyyy-MM-dd HH:mm:ss")
|
|
779
|
-
*
|
|
780
|
-
* @privateForWeDa
|
|
781
|
-
* {"group": "formula", "displayType": "function", "displayName": "使用时间戳创建日期时间"}
|
|
782
|
-
*/
|
|
783
|
-
/**
|
|
784
766
|
* 使用时间日期文本创建日期时间
|
|
785
767
|
*
|
|
786
768
|
* @remarks
|
|
787
769
|
* 将日期时间文本根据指定格式转化为日期时间,例如 DateTimeValue("2021-12-11 01:19:12", "yyyy-MM-dd HH:mm:ss")
|
|
788
770
|
*
|
|
789
771
|
* @privateForWeDa
|
|
790
|
-
* {"group": "formula", "displayType": "function", "displayName": "使用时间日期文本创建日期时间", "insertText": "DateTimeValue('2011-07-02', 'YYYY:MM:DD')"}
|
|
772
|
+
* {"group": "formula", "displayType": "function", "displayName": "使用时间日期文本创建日期时间", "insertText": "DateTimeValue('2011-07-02', 'YYYY:MM:DD')", "subGroup": "time"}
|
|
791
773
|
*/
|
|
792
774
|
function DateTimeValue(arg: string, val: string): number;
|
|
793
775
|
/**
|
|
@@ -797,7 +779,7 @@ alternate?: any;
|
|
|
797
779
|
* 根据输入的两个日期时间计算出年龄,例如 Age(Date(2017,3,24), Date(2021,3,24))
|
|
798
780
|
*
|
|
799
781
|
* @privateForWeDa
|
|
800
|
-
* {"group": "formula", "displayType": "function", "displayName": "计算年龄", "insertText": "Age(1661334203345, 1661334203345)"}
|
|
782
|
+
* {"group": "formula", "displayType": "function", "displayName": "计算年龄", "insertText": "Age(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
801
783
|
*/
|
|
802
784
|
function Age(arg: number | string | Date, val: number | string | Date): number;
|
|
803
785
|
/**
|
|
@@ -807,7 +789,7 @@ alternate?: any;
|
|
|
807
789
|
* 计算当前年龄,例如 AgeOfNow(Date(2017,3,24))
|
|
808
790
|
*
|
|
809
791
|
* @privateForWeDa
|
|
810
|
-
* {"group": "formula", "displayType": "function", "displayName": "计算当前年龄", "insertText": "AgeOfNow(1661334203345)"}
|
|
792
|
+
* {"group": "formula", "displayType": "function", "displayName": "计算当前年龄", "insertText": "AgeOfNow(1661334203345)", "subGroup": "time"}
|
|
811
793
|
*/
|
|
812
794
|
function AgeOfNow(arg: number | string | Date): number;
|
|
813
795
|
/**
|
|
@@ -817,7 +799,7 @@ alternate?: any;
|
|
|
817
799
|
* 在传入的日期时间上增加 X 天,支持负数
|
|
818
800
|
*
|
|
819
801
|
* @privateForWeDa
|
|
820
|
-
* {"group": "formula", "displayType": "function", "displayName": "增加 X 天", "insertText": "DateAdd(1661334203345, 1)"}
|
|
802
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 天", "insertText": "DateAdd(1661334203345, 1)", "subGroup": "time"}
|
|
821
803
|
*/
|
|
822
804
|
function DateAdd(arg: number | string | Date, day: number): number;
|
|
823
805
|
/**
|
|
@@ -827,7 +809,7 @@ alternate?: any;
|
|
|
827
809
|
* 在传入的日期和时间上增加 X 月,支持负数
|
|
828
810
|
*
|
|
829
811
|
* @privateForWeDa
|
|
830
|
-
* {"group": "formula", "displayType": "function", "displayName": "增加 X 月", "insertText": "MonthAdd(1661334203345, 1)"}
|
|
812
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 月", "insertText": "MonthAdd(1661334203345, 1)", "subGroup": "time"}
|
|
831
813
|
*/
|
|
832
814
|
function MonthAdd(arg: number | string | Date, month: number): number;
|
|
833
815
|
/**
|
|
@@ -837,7 +819,7 @@ alternate?: any;
|
|
|
837
819
|
* 在传入的日期和时间上增加 X 年,支持负数
|
|
838
820
|
*
|
|
839
821
|
* @privateForWeDa
|
|
840
|
-
* {"group": "formula", "displayType": "function", "displayName": "增加 X 年", "insertText": "YearAdd(1661334203345, 1)"}
|
|
822
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 年", "insertText": "YearAdd(1661334203345, 1)", "subGroup": "time"}
|
|
841
823
|
*/
|
|
842
824
|
function YearAdd(arg: number | string | Date, year: number): number;
|
|
843
825
|
/**
|
|
@@ -847,7 +829,7 @@ alternate?: any;
|
|
|
847
829
|
* 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
|
|
848
830
|
*
|
|
849
831
|
* @privateForWeDa
|
|
850
|
-
* {"group": "formula", "displayType": "function", "displayName": "天数差", "insertText": "DateDiff(1661334203345, 1661334203345)"}
|
|
832
|
+
* {"group": "formula", "displayType": "function", "displayName": "天数差", "insertText": "DateDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
851
833
|
*/
|
|
852
834
|
function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
853
835
|
/**
|
|
@@ -857,7 +839,7 @@ alternate?: any;
|
|
|
857
839
|
* 返回两个日期时间字段之间的小时差,如果为同一小时,差数为零
|
|
858
840
|
*
|
|
859
841
|
* @privateForWeDa
|
|
860
|
-
* {"group": "formula", "displayType": "function", "displayName": "小时差", "insertText": "HourDiff(1661334203345, 1661334203345)"}
|
|
842
|
+
* {"group": "formula", "displayType": "function", "displayName": "小时差", "insertText": "HourDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
861
843
|
*/
|
|
862
844
|
function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
863
845
|
/**
|
|
@@ -867,7 +849,7 @@ alternate?: any;
|
|
|
867
849
|
* 返回两个日期时间字段之间的分钟差,如果为同一分钟,差数为零
|
|
868
850
|
*
|
|
869
851
|
* @privateForWeDa
|
|
870
|
-
* {"group": "formula", "displayType": "function", "displayName": "分钟差", "insertText": "MinuteDiff(1661334203345, 1661334203345)"}
|
|
852
|
+
* {"group": "formula", "displayType": "function", "displayName": "分钟差", "insertText": "MinuteDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
871
853
|
*/
|
|
872
854
|
function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
873
855
|
/**
|
|
@@ -877,7 +859,7 @@ alternate?: any;
|
|
|
877
859
|
* 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
|
|
878
860
|
*
|
|
879
861
|
* @privateForWeDa
|
|
880
|
-
* {"group": "formula", "displayType": "function", "displayName": "秒数差", "insertText": "SecondDiff(1661334203345, 1661334203345)"}
|
|
862
|
+
* {"group": "formula", "displayType": "function", "displayName": "秒数差", "insertText": "SecondDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
881
863
|
*/
|
|
882
864
|
function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
883
865
|
/**
|
|
@@ -887,7 +869,7 @@ alternate?: any;
|
|
|
887
869
|
* 返回两个日期时间字段之间的月数差,如果为同一月,差数为零
|
|
888
870
|
*
|
|
889
871
|
* @privateForWeDa
|
|
890
|
-
* {"group": "formula", "displayType": "function", "displayName": "月数差", "insertText": "MonthDiff(1661334203345, 1661334203345)"}
|
|
872
|
+
* {"group": "formula", "displayType": "function", "displayName": "月数差", "insertText": "MonthDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
891
873
|
*/
|
|
892
874
|
function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
893
875
|
/**
|
|
@@ -897,7 +879,7 @@ alternate?: any;
|
|
|
897
879
|
* 返回两个日期时间字段之间的年数差,如果为同一年,差数为零
|
|
898
880
|
*
|
|
899
881
|
* @privateForWeDa
|
|
900
|
-
* {"group": "formula", "displayType": "function", "displayName": "年数差", "insertText": "YearDiff(1661334203345, 1661334203345)"}
|
|
882
|
+
* {"group": "formula", "displayType": "function", "displayName": "年数差", "insertText": "YearDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
901
883
|
*/
|
|
902
884
|
function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
903
885
|
/**
|
|
@@ -907,7 +889,7 @@ alternate?: any;
|
|
|
907
889
|
* 格式化日期时间为指定格式的文本,例如 DateText(Date(2017,3,24), "yyyy-MM-dd HH:mm:ss")
|
|
908
890
|
*
|
|
909
891
|
* @privateForWeDa
|
|
910
|
-
* {"group": "formula", "displayType": "function", "displayName": "日期时间格式化", "insertText": "DateText(1661334203345, 'YYYY-MM-DD HH:mm:ss')"}
|
|
892
|
+
* {"group": "formula", "displayType": "function", "displayName": "日期时间格式化", "insertText": "DateText(1661334203345, 'YYYY-MM-DD HH:mm:ss')", "subGroup": "time"}
|
|
911
893
|
*/
|
|
912
894
|
function DateText(createdTime: number | string | Date, text: string): string;
|
|
913
895
|
/**
|
|
@@ -917,7 +899,7 @@ alternate?: any;
|
|
|
917
899
|
* 判断传入的日期时间是否为今天,例如 IsToday(Date(2022,4,8))
|
|
918
900
|
*
|
|
919
901
|
* @privateForWeDa
|
|
920
|
-
* {"group": "formula", "displayType": "function", "displayName": "是否为今天", "insertText": "IsToday(1661334203345)"}
|
|
902
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为今天", "insertText": "IsToday(1661334203345)", "subGroup": "time"}
|
|
921
903
|
*/
|
|
922
904
|
function IsToday(date: number | string | Date): boolean;
|
|
923
905
|
|
|
@@ -1033,7 +1015,7 @@ declare namespace $comp {
|
|
|
1033
1015
|
* 计算传入数字的绝对值
|
|
1034
1016
|
*
|
|
1035
1017
|
* @privateForWeDa
|
|
1036
|
-
* {"group": "formula", "displayType": "function", "displayName": "绝对值", "insertText": "ABS(1)"}
|
|
1018
|
+
* {"group": "formula", "displayType": "function", "displayName": "绝对值", "insertText": "ABS(1)", "subGroup": "calculation"}
|
|
1037
1019
|
*/
|
|
1038
1020
|
declare function ABS(num: number): number;
|
|
1039
1021
|
/**
|
|
@@ -1043,7 +1025,7 @@ declare function ABS(num: number): number;
|
|
|
1043
1025
|
* 返回一组数字中的最小值
|
|
1044
1026
|
*
|
|
1045
1027
|
* @privateForWeDa
|
|
1046
|
-
* {"group": "formula", "displayType": "function", "displayName": "最小值", "insertText": "Min(1, 2)"}
|
|
1028
|
+
* {"group": "formula", "displayType": "function", "displayName": "最小值", "insertText": "Min(1, 2)", "subGroup": "calculation"}
|
|
1047
1029
|
*/
|
|
1048
1030
|
declare function Min(...args: number[]): number;
|
|
1049
1031
|
/**
|
|
@@ -1053,7 +1035,7 @@ declare function Min(...args: number[]): number;
|
|
|
1053
1035
|
* 返回一组数字中的最大值
|
|
1054
1036
|
*
|
|
1055
1037
|
* @privateForWeDa
|
|
1056
|
-
* {"group": "formula", "displayType": "function", "displayName": "最大值", "insertText": "Max(1, 2)"}
|
|
1038
|
+
* {"group": "formula", "displayType": "function", "displayName": "最大值", "insertText": "Max(1, 2)", "subGroup": "calculation"}
|
|
1057
1039
|
*/
|
|
1058
1040
|
declare function Max(...args: number[]): number;
|
|
1059
1041
|
/**
|
|
@@ -1063,7 +1045,7 @@ declare function Max(...args: number[]): number;
|
|
|
1063
1045
|
* 返回一组数字中的平均值
|
|
1064
1046
|
*
|
|
1065
1047
|
* @privateForWeDa
|
|
1066
|
-
* {"group": "formula", "displayType": "function", "displayName": "平均值", "insertText": "Average(1, 2)"}
|
|
1048
|
+
* {"group": "formula", "displayType": "function", "displayName": "平均值", "insertText": "Average(1, 2)", "subGroup": "calculation"}
|
|
1067
1049
|
*/
|
|
1068
1050
|
declare function Average(...args: number[]): number;
|
|
1069
1051
|
/**
|
|
@@ -1073,7 +1055,7 @@ declare function Average(...args: number[]): number;
|
|
|
1073
1055
|
* 返回传入数字向下取整的结果
|
|
1074
1056
|
*
|
|
1075
1057
|
* @privateForWeDa
|
|
1076
|
-
* {"group": "formula", "displayType": "function", "displayName": "向下取整", "insertText": "Floor(1)"}
|
|
1058
|
+
* {"group": "formula", "displayType": "function", "displayName": "向下取整", "insertText": "Floor(1)", "subGroup": "calculation"}
|
|
1077
1059
|
*/
|
|
1078
1060
|
declare function Floor(num: number): number;
|
|
1079
1061
|
/**
|
|
@@ -1083,7 +1065,7 @@ declare function Floor(num: number): number;
|
|
|
1083
1065
|
* 返回传入数字向上取整的结果
|
|
1084
1066
|
*
|
|
1085
1067
|
* @privateForWeDa
|
|
1086
|
-
* {"group": "formula", "displayType": "function", "displayName": "向上取整", "insertText": "Ceiling(1)"}
|
|
1068
|
+
* {"group": "formula", "displayType": "function", "displayName": "向上取整", "insertText": "Ceiling(1)", "subGroup": "calculation"}
|
|
1087
1069
|
*/
|
|
1088
1070
|
declare function Ceiling(num: number): number;
|
|
1089
1071
|
/**
|
|
@@ -1093,7 +1075,7 @@ declare function Ceiling(num: number): number;
|
|
|
1093
1075
|
* 返回传入数字四舍五入后的结果
|
|
1094
1076
|
*
|
|
1095
1077
|
* @privateForWeDa
|
|
1096
|
-
* {"group": "formula", "displayType": "function", "displayName": "四舍五入", "insertText": "Round(1)"}
|
|
1078
|
+
* {"group": "formula", "displayType": "function", "displayName": "四舍五入", "insertText": "Round(1)", "subGroup": "calculation"}
|
|
1097
1079
|
*/
|
|
1098
1080
|
declare function Round(num: number): number;
|
|
1099
1081
|
/**
|
|
@@ -1103,7 +1085,7 @@ declare function Round(num: number): number;
|
|
|
1103
1085
|
* 返回一组数字中的和
|
|
1104
1086
|
*
|
|
1105
1087
|
* @privateForWeDa
|
|
1106
|
-
* {"group": "formula", "displayType": "function", "displayName": "求和", "insertText": "Sum(1, 2)"}
|
|
1088
|
+
* {"group": "formula", "displayType": "function", "displayName": "求和", "insertText": "Sum(1, 2)", "subGroup": "calculation"}
|
|
1107
1089
|
*/
|
|
1108
1090
|
declare function Sum(...args: number[]): number;
|
|
1109
1091
|
/**
|
|
@@ -1113,7 +1095,7 @@ declare function Sum(...args: number[]): number;
|
|
|
1113
1095
|
* 返回一个指定范围的伪随机数,例如 Rand(10),返回一个范围在 10 以内的随机数
|
|
1114
1096
|
*
|
|
1115
1097
|
* @privateForWeDa
|
|
1116
|
-
* {"group": "formula", "displayType": "function", "displayName": "随机数", "insertText": "Rand(1)"}
|
|
1098
|
+
* {"group": "formula", "displayType": "function", "displayName": "随机数", "insertText": "Rand(1)", "subGroup": "calculation"}
|
|
1117
1099
|
*/
|
|
1118
1100
|
declare function Rand(num: number): number;
|
|
1119
1101
|
|
|
@@ -1129,7 +1111,7 @@ alternate?: any;
|
|
|
1129
1111
|
* 按判断条件进行逻辑比较,满足时返回一个值,不满足时返回另一个值。
|
|
1130
1112
|
*
|
|
1131
1113
|
* @privateForWeDa
|
|
1132
|
-
* {"group": "formula", "displayType": "function", "displayName": "条件分支", "insertText": "If(true, '您好', 'hello')"}
|
|
1114
|
+
* {"group": "formula", "displayType": "function", "displayName": "条件分支", "insertText": "If(true, '您好', 'hello')", "subGroup": "logic"}
|
|
1133
1115
|
*/
|
|
1134
1116
|
declare function If(data: IIfObjectParam): any;
|
|
1135
1117
|
declare function If(condition: boolean, consequent?: any, alternate?: any): any;
|
|
@@ -1140,7 +1122,7 @@ declare function If(condition: boolean, consequent?: any, alternate?: any): any;
|
|
|
1140
1122
|
* 判断传入的文本是否为空
|
|
1141
1123
|
*
|
|
1142
1124
|
* @privateForWeDa
|
|
1143
|
-
* {"group": "formula", "displayType": "function", "displayName": "是否为空", "insertText": "IsEmpty('hello')"}
|
|
1125
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为空", "insertText": "IsEmpty('hello')", "subGroup": "logic"}
|
|
1144
1126
|
*/
|
|
1145
1127
|
declare function IsEmpty(text: string | string[]): boolean;
|
|
1146
1128
|
/**
|
|
@@ -1150,7 +1132,7 @@ declare function IsEmpty(text: string | string[]): boolean;
|
|
|
1150
1132
|
* 判断传入的字段值是否包含数据,即不为 NULL
|
|
1151
1133
|
*
|
|
1152
1134
|
* @privateForWeDa
|
|
1153
|
-
* {"group": "formula", "displayType": "function", "displayName": "是否为null", "insertText": "NotNull(null)"}
|
|
1135
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为null", "insertText": "NotNull(null)", "subGroup": "logic"}
|
|
1154
1136
|
*/
|
|
1155
1137
|
declare function NotNull(val: any): boolean;
|
|
1156
1138
|
/**
|
|
@@ -1160,7 +1142,7 @@ declare function NotNull(val: any): boolean;
|
|
|
1160
1142
|
* 用于确定所有判断条件是否为真
|
|
1161
1143
|
*
|
|
1162
1144
|
* @privateForWeDa
|
|
1163
|
-
* {"group": "formula", "displayType": "function", "displayName": "与", "insertText": "And(true, false)"}
|
|
1145
|
+
* {"group": "formula", "displayType": "function", "displayName": "与", "insertText": "And(true, false)", "subGroup": "logic"}
|
|
1164
1146
|
*/
|
|
1165
1147
|
declare function And(...args: boolean[]): boolean;
|
|
1166
1148
|
/**
|
|
@@ -1170,7 +1152,7 @@ declare function And(...args: boolean[]): boolean;
|
|
|
1170
1152
|
* 任意一个判断条件为真,则结果为真;所有条件为否,结果才为否
|
|
1171
1153
|
*
|
|
1172
1154
|
* @privateForWeDa
|
|
1173
|
-
* {"group": "formula", "displayType": "function", "displayName": "或", "insertText": "Or(true, false)"}
|
|
1155
|
+
* {"group": "formula", "displayType": "function", "displayName": "或", "insertText": "Or(true, false)", "subGroup": "logic"}
|
|
1174
1156
|
*/
|
|
1175
1157
|
declare function Or(...args: boolean[]): boolean;
|
|
1176
1158
|
|
|
@@ -1181,7 +1163,7 @@ declare function Or(...args: boolean[]): boolean;
|
|
|
1181
1163
|
* 获取传入文本的字符数
|
|
1182
1164
|
*
|
|
1183
1165
|
* @privateForWeDa
|
|
1184
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取文本长度", "insertText": "Len('文本')"}
|
|
1166
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取文本长度", "insertText": "Len('文本')", "subGroup": "text"}
|
|
1185
1167
|
*/
|
|
1186
1168
|
declare function Len(text: string): number;
|
|
1187
1169
|
/**
|
|
@@ -1191,7 +1173,7 @@ declare function Len(text: string): number;
|
|
|
1191
1173
|
* 判断文本 1 是否包含文本 2
|
|
1192
1174
|
*
|
|
1193
1175
|
* @privateForWeDa
|
|
1194
|
-
* {"group": "formula", "displayType": "function", "displayName": "是否包含指定文本", "insertText": "Contains('文本1', '文本2')"}
|
|
1176
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否包含指定文本", "insertText": "Contains('文本1', '文本2')", "subGroup": "text"}
|
|
1195
1177
|
*/
|
|
1196
1178
|
declare function Contains(text1: string, text2: string): boolean;
|
|
1197
1179
|
/**
|
|
@@ -1201,7 +1183,7 @@ declare function Contains(text1: string, text2: string): boolean;
|
|
|
1201
1183
|
* 根据传入的文本 2,将文本 1 拆分成文本数组,例如 Split("张三,李四,王五", ",")
|
|
1202
1184
|
*
|
|
1203
1185
|
* @privateForWeDa
|
|
1204
|
-
* {"group": "formula", "displayType": "function", "displayName": "拆分文本", "insertText": "Split('文本1', '文本2')"}
|
|
1186
|
+
* {"group": "formula", "displayType": "function", "displayName": "拆分文本", "insertText": "Split('文本1', '文本2')", "subGroup": "text"}
|
|
1205
1187
|
*/
|
|
1206
1188
|
declare function Split(text1: string, text2: string): string[];
|
|
1207
1189
|
/**
|
|
@@ -1211,7 +1193,7 @@ declare function Split(text1: string, text2: string): string[];
|
|
|
1211
1193
|
* 删除文本开头和结尾的所有空格和制表符,文本中间的空格和制表符不会删除
|
|
1212
1194
|
*
|
|
1213
1195
|
* @privateForWeDa
|
|
1214
|
-
* {"group": "formula", "displayType": "function", "displayName": "删除开头/结尾空格和制表符", "insertText": "Trim('文本')"}
|
|
1196
|
+
* {"group": "formula", "displayType": "function", "displayName": "删除开头/结尾空格和制表符", "insertText": "Trim('文本')", "subGroup": "text"}
|
|
1215
1197
|
*/
|
|
1216
1198
|
declare function Trim(text: string): string;
|
|
1217
1199
|
/**
|
|
@@ -1221,7 +1203,7 @@ declare function Trim(text: string): string;
|
|
|
1221
1203
|
* 将传入的文本转为全大写文本
|
|
1222
1204
|
*
|
|
1223
1205
|
* @privateForWeDa
|
|
1224
|
-
* {"group": "formula", "displayType": "function", "displayName": "转换为大写", "insertText": "Upper('文本')"}
|
|
1206
|
+
* {"group": "formula", "displayType": "function", "displayName": "转换为大写", "insertText": "Upper('文本')", "subGroup": "text"}
|
|
1225
1207
|
*/
|
|
1226
1208
|
declare function Upper(text: string): string;
|
|
1227
1209
|
/**
|
|
@@ -1231,26 +1213,17 @@ declare function Upper(text: string): string;
|
|
|
1231
1213
|
* 将传入的文本转为全小写文本
|
|
1232
1214
|
*
|
|
1233
1215
|
* @privateForWeDa
|
|
1234
|
-
* {"group": "formula", "displayType": "function", "displayName": "转换为小写", "insertText": "Lower('文本')"}
|
|
1216
|
+
* {"group": "formula", "displayType": "function", "displayName": "转换为小写", "insertText": "Lower('文本')", "subGroup": "text"}
|
|
1235
1217
|
*/
|
|
1236
1218
|
declare function Lower(text: string): string;
|
|
1237
1219
|
/**
|
|
1238
|
-
* 转换为文本
|
|
1239
|
-
*
|
|
1240
|
-
* @remarks
|
|
1241
|
-
* 将数字、时间日期等转换为文本
|
|
1242
|
-
*
|
|
1243
|
-
* @privateForWeDa
|
|
1244
|
-
* {"group": "formula", "displayType": "function", "displayName": "转换为文本"}
|
|
1245
|
-
*/
|
|
1246
|
-
/**
|
|
1247
1220
|
* 文本拼接
|
|
1248
1221
|
*
|
|
1249
1222
|
* @remarks
|
|
1250
1223
|
* 返回多个文本拼接后的新文本
|
|
1251
1224
|
*
|
|
1252
1225
|
* @privateForWeDa
|
|
1253
|
-
* {"group": "formula", "displayType": "function", "displayName": "文本拼接", "insertText": "Concat('文本1', '文本2')"}
|
|
1226
|
+
* {"group": "formula", "displayType": "function", "displayName": "文本拼接", "insertText": "Concat('文本1', '文本2')", "subGroup": "text"}
|
|
1254
1227
|
*/
|
|
1255
1228
|
declare function Concat(...text: string[]): string;
|
|
1256
1229
|
|
|
@@ -1261,7 +1234,7 @@ declare function Concat(...text: string[]): string;
|
|
|
1261
1234
|
* 返回当前系统时间,通常与其他日期时间函数搭配使用
|
|
1262
1235
|
*
|
|
1263
1236
|
* @privateForWeDa
|
|
1264
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取现在时间", "insertText": "Now()"}
|
|
1237
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取现在时间", "insertText": "Now()", "subGroup": "time"}
|
|
1265
1238
|
*/
|
|
1266
1239
|
declare function Now(): number;
|
|
1267
1240
|
/**
|
|
@@ -1271,7 +1244,7 @@ declare function Now(): number;
|
|
|
1271
1244
|
* 根据输入的日期时间返回时间戳
|
|
1272
1245
|
*
|
|
1273
1246
|
* @privateForWeDa
|
|
1274
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取时间戳", "insertText": "Timestamp(1661334203345)"}
|
|
1247
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取时间戳", "insertText": "Timestamp(1661334203345)", "subGroup": "time"}
|
|
1275
1248
|
*/
|
|
1276
1249
|
declare function Timestamp(arg: number | string | Date): number;
|
|
1277
1250
|
/**
|
|
@@ -1281,7 +1254,7 @@ declare function Timestamp(arg: number | string | Date): number;
|
|
|
1281
1254
|
* 根据输入的日期时间返回该时间的秒数
|
|
1282
1255
|
*
|
|
1283
1256
|
* @privateForWeDa
|
|
1284
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取秒数", "insertText": "Second(1661334203345)"}
|
|
1257
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取秒数", "insertText": "Second(1661334203345)", "subGroup": "time"}
|
|
1285
1258
|
*/
|
|
1286
1259
|
declare function Second(arg: number | string | Date): number;
|
|
1287
1260
|
/**
|
|
@@ -1291,7 +1264,7 @@ declare function Second(arg: number | string | Date): number;
|
|
|
1291
1264
|
* 根据输入的日期时间返回该时间的分钟部分
|
|
1292
1265
|
*
|
|
1293
1266
|
* @privateForWeDa
|
|
1294
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取分钟数", "insertText": "Minute(1661334203345)"}
|
|
1267
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取分钟数", "insertText": "Minute(1661334203345)", "subGroup": "time"}
|
|
1295
1268
|
*/
|
|
1296
1269
|
declare function Minute(arg: number | string | Date): number;
|
|
1297
1270
|
/**
|
|
@@ -1301,7 +1274,7 @@ declare function Minute(arg: number | string | Date): number;
|
|
|
1301
1274
|
* 根据输入的日期时间返回该时间的小时部分,24小时制
|
|
1302
1275
|
*
|
|
1303
1276
|
* @privateForWeDa
|
|
1304
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取小时数", "insertText": "Hour(1661334203345)"}
|
|
1277
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取小时数", "insertText": "Hour(1661334203345)", "subGroup": "time"}
|
|
1305
1278
|
*/
|
|
1306
1279
|
declare function Hour(arg: number | string | Date): number;
|
|
1307
1280
|
/**
|
|
@@ -1311,7 +1284,7 @@ declare function Hour(arg: number | string | Date): number;
|
|
|
1311
1284
|
* 根据输入的日期时间返回该时间的日部分,范围为 1-31
|
|
1312
1285
|
*
|
|
1313
1286
|
* @privateForWeDa
|
|
1314
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取天数", "insertText": "Day(1661334203345)"}
|
|
1287
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取天数", "insertText": "Day(1661334203345)", "subGroup": "time"}
|
|
1315
1288
|
*/
|
|
1316
1289
|
declare function Day(arg: number | string | Date): number;
|
|
1317
1290
|
/**
|
|
@@ -1321,7 +1294,7 @@ declare function Day(arg: number | string | Date): number;
|
|
|
1321
1294
|
* 根据输入的日期时间返回该时间的星期数
|
|
1322
1295
|
*
|
|
1323
1296
|
* @privateForWeDa
|
|
1324
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取星期数", "insertText": "DayOfWeek(1661334203345)"}
|
|
1297
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取星期数", "insertText": "DayOfWeek(1661334203345)", "subGroup": "time"}
|
|
1325
1298
|
*/
|
|
1326
1299
|
declare function DayOfWeek(arg: number | string | Date): number;
|
|
1327
1300
|
/**
|
|
@@ -1331,7 +1304,7 @@ declare function DayOfWeek(arg: number | string | Date): number;
|
|
|
1331
1304
|
* 根据输入的日期时间返回该时间的月份
|
|
1332
1305
|
*
|
|
1333
1306
|
* @privateForWeDa
|
|
1334
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取月数", "insertText": "Month(1661334203345)"}
|
|
1307
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取月数", "insertText": "Month(1661334203345)", "subGroup": "time"}
|
|
1335
1308
|
*/
|
|
1336
1309
|
declare function Month(arg: number | string | Date): number;
|
|
1337
1310
|
/**
|
|
@@ -1341,7 +1314,7 @@ declare function Month(arg: number | string | Date): number;
|
|
|
1341
1314
|
* 根据输入的日期时间返回该时间的年份
|
|
1342
1315
|
*
|
|
1343
1316
|
* @privateForWeDa
|
|
1344
|
-
* {"group": "formula", "displayType": "function", "displayName": "获取年份", "insertText": "Year(1661334203345)"}
|
|
1317
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取年份", "insertText": "Year(1661334203345)", "subGroup": "time"}
|
|
1345
1318
|
*/
|
|
1346
1319
|
declare function Year(arg: number | string | Date): number;
|
|
1347
1320
|
/**
|
|
@@ -1351,26 +1324,17 @@ declare function Year(arg: number | string | Date): number;
|
|
|
1351
1324
|
* 根据输入的年月日数值返回一个日期类型的数据,例如 GetDate(2017,3,24)
|
|
1352
1325
|
*
|
|
1353
1326
|
* @privateForWeDa
|
|
1354
|
-
* {"group": "formula", "displayType": "function", "displayName": "使用年月日创建日期时间", "insertText": "GetDate(2011, 7, 2)"}
|
|
1327
|
+
* {"group": "formula", "displayType": "function", "displayName": "使用年月日创建日期时间", "insertText": "GetDate(2011, 7, 2)", "subGroup": "time"}
|
|
1355
1328
|
*/
|
|
1356
1329
|
declare function GetDate(year: number, month: number, day: number): number;
|
|
1357
1330
|
/**
|
|
1358
|
-
* 使用时间戳创建日期时间
|
|
1359
|
-
*
|
|
1360
|
-
* @remarks
|
|
1361
|
-
* 将日期时间文本根据指定格式转化为日期时间,例如 DateTimeValue("2021-12-11 01:19:12", "yyyy-MM-dd HH:mm:ss")
|
|
1362
|
-
*
|
|
1363
|
-
* @privateForWeDa
|
|
1364
|
-
* {"group": "formula", "displayType": "function", "displayName": "使用时间戳创建日期时间"}
|
|
1365
|
-
*/
|
|
1366
|
-
/**
|
|
1367
1331
|
* 使用时间日期文本创建日期时间
|
|
1368
1332
|
*
|
|
1369
1333
|
* @remarks
|
|
1370
1334
|
* 将日期时间文本根据指定格式转化为日期时间,例如 DateTimeValue("2021-12-11 01:19:12", "yyyy-MM-dd HH:mm:ss")
|
|
1371
1335
|
*
|
|
1372
1336
|
* @privateForWeDa
|
|
1373
|
-
* {"group": "formula", "displayType": "function", "displayName": "使用时间日期文本创建日期时间", "insertText": "DateTimeValue('2011-07-02', 'YYYY:MM:DD')"}
|
|
1337
|
+
* {"group": "formula", "displayType": "function", "displayName": "使用时间日期文本创建日期时间", "insertText": "DateTimeValue('2011-07-02', 'YYYY:MM:DD')", "subGroup": "time"}
|
|
1374
1338
|
*/
|
|
1375
1339
|
declare function DateTimeValue(arg: string, val: string): number;
|
|
1376
1340
|
/**
|
|
@@ -1380,7 +1344,7 @@ declare function DateTimeValue(arg: string, val: string): number;
|
|
|
1380
1344
|
* 根据输入的两个日期时间计算出年龄,例如 Age(Date(2017,3,24), Date(2021,3,24))
|
|
1381
1345
|
*
|
|
1382
1346
|
* @privateForWeDa
|
|
1383
|
-
* {"group": "formula", "displayType": "function", "displayName": "计算年龄", "insertText": "Age(1661334203345, 1661334203345)"}
|
|
1347
|
+
* {"group": "formula", "displayType": "function", "displayName": "计算年龄", "insertText": "Age(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
1384
1348
|
*/
|
|
1385
1349
|
declare function Age(arg: number | string | Date, val: number | string | Date): number;
|
|
1386
1350
|
/**
|
|
@@ -1390,7 +1354,7 @@ declare function Age(arg: number | string | Date, val: number | string | Date):
|
|
|
1390
1354
|
* 计算当前年龄,例如 AgeOfNow(Date(2017,3,24))
|
|
1391
1355
|
*
|
|
1392
1356
|
* @privateForWeDa
|
|
1393
|
-
* {"group": "formula", "displayType": "function", "displayName": "计算当前年龄", "insertText": "AgeOfNow(1661334203345)"}
|
|
1357
|
+
* {"group": "formula", "displayType": "function", "displayName": "计算当前年龄", "insertText": "AgeOfNow(1661334203345)", "subGroup": "time"}
|
|
1394
1358
|
*/
|
|
1395
1359
|
declare function AgeOfNow(arg: number | string | Date): number;
|
|
1396
1360
|
/**
|
|
@@ -1400,7 +1364,7 @@ declare function AgeOfNow(arg: number | string | Date): number;
|
|
|
1400
1364
|
* 在传入的日期时间上增加 X 天,支持负数
|
|
1401
1365
|
*
|
|
1402
1366
|
* @privateForWeDa
|
|
1403
|
-
* {"group": "formula", "displayType": "function", "displayName": "增加 X 天", "insertText": "DateAdd(1661334203345, 1)"}
|
|
1367
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 天", "insertText": "DateAdd(1661334203345, 1)", "subGroup": "time"}
|
|
1404
1368
|
*/
|
|
1405
1369
|
declare function DateAdd(arg: number | string | Date, day: number): number;
|
|
1406
1370
|
/**
|
|
@@ -1410,7 +1374,7 @@ declare function DateAdd(arg: number | string | Date, day: number): number;
|
|
|
1410
1374
|
* 在传入的日期和时间上增加 X 月,支持负数
|
|
1411
1375
|
*
|
|
1412
1376
|
* @privateForWeDa
|
|
1413
|
-
* {"group": "formula", "displayType": "function", "displayName": "增加 X 月", "insertText": "MonthAdd(1661334203345, 1)"}
|
|
1377
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 月", "insertText": "MonthAdd(1661334203345, 1)", "subGroup": "time"}
|
|
1414
1378
|
*/
|
|
1415
1379
|
declare function MonthAdd(arg: number | string | Date, month: number): number;
|
|
1416
1380
|
/**
|
|
@@ -1420,7 +1384,7 @@ declare function MonthAdd(arg: number | string | Date, month: number): number;
|
|
|
1420
1384
|
* 在传入的日期和时间上增加 X 年,支持负数
|
|
1421
1385
|
*
|
|
1422
1386
|
* @privateForWeDa
|
|
1423
|
-
* {"group": "formula", "displayType": "function", "displayName": "增加 X 年", "insertText": "YearAdd(1661334203345, 1)"}
|
|
1387
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 年", "insertText": "YearAdd(1661334203345, 1)", "subGroup": "time"}
|
|
1424
1388
|
*/
|
|
1425
1389
|
declare function YearAdd(arg: number | string | Date, year: number): number;
|
|
1426
1390
|
/**
|
|
@@ -1430,7 +1394,7 @@ declare function YearAdd(arg: number | string | Date, year: number): number;
|
|
|
1430
1394
|
* 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
|
|
1431
1395
|
*
|
|
1432
1396
|
* @privateForWeDa
|
|
1433
|
-
* {"group": "formula", "displayType": "function", "displayName": "天数差", "insertText": "DateDiff(1661334203345, 1661334203345)"}
|
|
1397
|
+
* {"group": "formula", "displayType": "function", "displayName": "天数差", "insertText": "DateDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
1434
1398
|
*/
|
|
1435
1399
|
declare function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1436
1400
|
/**
|
|
@@ -1440,7 +1404,7 @@ declare function DateDiff(startDay: number | string | Date, endDay: number | str
|
|
|
1440
1404
|
* 返回两个日期时间字段之间的小时差,如果为同一小时,差数为零
|
|
1441
1405
|
*
|
|
1442
1406
|
* @privateForWeDa
|
|
1443
|
-
* {"group": "formula", "displayType": "function", "displayName": "小时差", "insertText": "HourDiff(1661334203345, 1661334203345)"}
|
|
1407
|
+
* {"group": "formula", "displayType": "function", "displayName": "小时差", "insertText": "HourDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
1444
1408
|
*/
|
|
1445
1409
|
declare function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1446
1410
|
/**
|
|
@@ -1450,7 +1414,7 @@ declare function HourDiff(startDay: number | string | Date, endDay: number | str
|
|
|
1450
1414
|
* 返回两个日期时间字段之间的分钟差,如果为同一分钟,差数为零
|
|
1451
1415
|
*
|
|
1452
1416
|
* @privateForWeDa
|
|
1453
|
-
* {"group": "formula", "displayType": "function", "displayName": "分钟差", "insertText": "MinuteDiff(1661334203345, 1661334203345)"}
|
|
1417
|
+
* {"group": "formula", "displayType": "function", "displayName": "分钟差", "insertText": "MinuteDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
1454
1418
|
*/
|
|
1455
1419
|
declare function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1456
1420
|
/**
|
|
@@ -1460,7 +1424,7 @@ declare function MinuteDiff(startDay: number | string | Date, endDay: number | s
|
|
|
1460
1424
|
* 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
|
|
1461
1425
|
*
|
|
1462
1426
|
* @privateForWeDa
|
|
1463
|
-
* {"group": "formula", "displayType": "function", "displayName": "秒数差", "insertText": "SecondDiff(1661334203345, 1661334203345)"}
|
|
1427
|
+
* {"group": "formula", "displayType": "function", "displayName": "秒数差", "insertText": "SecondDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
1464
1428
|
*/
|
|
1465
1429
|
declare function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1466
1430
|
/**
|
|
@@ -1470,7 +1434,7 @@ declare function SecondDiff(startDay: number | string | Date, endDay: number | s
|
|
|
1470
1434
|
* 返回两个日期时间字段之间的月数差,如果为同一月,差数为零
|
|
1471
1435
|
*
|
|
1472
1436
|
* @privateForWeDa
|
|
1473
|
-
* {"group": "formula", "displayType": "function", "displayName": "月数差", "insertText": "MonthDiff(1661334203345, 1661334203345)"}
|
|
1437
|
+
* {"group": "formula", "displayType": "function", "displayName": "月数差", "insertText": "MonthDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
1474
1438
|
*/
|
|
1475
1439
|
declare function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1476
1440
|
/**
|
|
@@ -1480,7 +1444,7 @@ declare function MonthDiff(startDay: number | string | Date, endDay: number | st
|
|
|
1480
1444
|
* 返回两个日期时间字段之间的年数差,如果为同一年,差数为零
|
|
1481
1445
|
*
|
|
1482
1446
|
* @privateForWeDa
|
|
1483
|
-
* {"group": "formula", "displayType": "function", "displayName": "年数差", "insertText": "YearDiff(1661334203345, 1661334203345)"}
|
|
1447
|
+
* {"group": "formula", "displayType": "function", "displayName": "年数差", "insertText": "YearDiff(1661334203345, 1661334203345)", "subGroup": "time"}
|
|
1484
1448
|
*/
|
|
1485
1449
|
declare function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1486
1450
|
/**
|
|
@@ -1490,7 +1454,7 @@ declare function YearDiff(startDay: number | string | Date, endDay: number | str
|
|
|
1490
1454
|
* 格式化日期时间为指定格式的文本,例如 DateText(Date(2017,3,24), "yyyy-MM-dd HH:mm:ss")
|
|
1491
1455
|
*
|
|
1492
1456
|
* @privateForWeDa
|
|
1493
|
-
* {"group": "formula", "displayType": "function", "displayName": "日期时间格式化", "insertText": "DateText(1661334203345, 'YYYY-MM-DD HH:mm:ss')"}
|
|
1457
|
+
* {"group": "formula", "displayType": "function", "displayName": "日期时间格式化", "insertText": "DateText(1661334203345, 'YYYY-MM-DD HH:mm:ss')", "subGroup": "time"}
|
|
1494
1458
|
*/
|
|
1495
1459
|
declare function DateText(createdTime: number | string | Date, text: string): string;
|
|
1496
1460
|
/**
|
|
@@ -1500,7 +1464,7 @@ declare function DateText(createdTime: number | string | Date, text: string): st
|
|
|
1500
1464
|
* 判断传入的日期时间是否为今天,例如 IsToday(Date(2022,4,8))
|
|
1501
1465
|
*
|
|
1502
1466
|
* @privateForWeDa
|
|
1503
|
-
* {"group": "formula", "displayType": "function", "displayName": "是否为今天", "insertText": "IsToday(1661334203345)"}
|
|
1467
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为今天", "insertText": "IsToday(1661334203345)", "subGroup": "time"}
|
|
1504
1468
|
*/
|
|
1505
1469
|
declare function IsToday(date: number | string | Date): boolean;
|
|
1506
1470
|
|