本帖最后由 永洪tech_xh 于 2022-6-26 19:00 编辑
- var xx=formatDate(param["文本参数1"],'yyyy年MM月dd日')
- var cmonth=month(param["文本参数1"])
- var cday=day(param["文本参数1"])
- var char_num=['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九']
- if(cday==10)
- {
- xx=replace(xx,9,2,'十')
- }
- else if(cday>10 && cday<20)
- {
- xx=replace(xx,9,1,'十')
- }
- else if(cday==20)
- {
- xx=replace(xx,9,2,'二十')
- }
- else if(cday>=20 && cday<30)
- {
- xx=replace(xx,9,1,'二十')
- }
- else if(cday==30)
- {
- xx=replace(xx,9,2,'三十')
- }
- else if(cday>=30)
- {
- xx=replace(xx,9,1,'三十')
- }
- if(cday<10)
- {
- xx=replace(xx,9,1,'')
- }
- if(cmonth==10)
- {
- xx=replace(xx,6,2,'十')
- }
- else if(cmonth>10)
- {
- xx=replace(xx,6,1,'十')
- }
- if(cmonth<10)
- {
- xx=replace(xx,6,1,'')
- }
- for(i=0;i<=char_num.length;i++)
- {
- xx=replaceRegex(xx,i.toString(),char_num[i])
- }
- 文本1.data=xx
复制代码
|