用一条语句写成的有关日期函数
mid(fill(
'鼠牛虎兔龙蛇马羊猴鸡狗猪'
,48),(mod(ls_year -1900,12)+13)*2 -1,2)
mid(fill(
'甲乙丙丁戊己庚辛壬癸'
,40),(mod(ls_year -1924,10)+11)*2 -1,2)+mid(fill(
'子丑寅卯辰巳午未申酉戌亥'
,48),(mod(ls_year -1924,12)+13)*2 -1,2)
mid(
"摩羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手摩羯"
,(month(ls_date)+sign(sign(day(ls_date) -(19+integer(mid(
'102123444423'
,month(ls_date),1))))+1))*4 -3,4)+
'座'
abs
(sign(mod(sign(mod(
abs
(ls_year),4))+sign(mod(
abs
(ls_year),100))+sign(mod(
abs
(ls_year),400)),2)) -1)
integer(28+integer(mid(
'3'
+string(
abs
(sign(mod(sign(mod(
abs
(year(ls_date)),4))+sign(mod(
abs
(year(ls_date)),100))+sign(mod(
abs
(year(ls_date)),400)),2)) -1))+
'3232332323'
,month(ls_date),1)))
date(year(ls_date),month(ls_date),integer(28+integer(mid(
'3'
+string(
abs
(sign(mod(sign(mod(
abs
(year(ls_date)),4))+sign(mod(
abs
(year(ls_date)),100))+sign(mod(
abs
(year(ls_date)),400)),2)) -1))+
'3232332323'
,month(ls_date),1))))
a.
RelativeDate (date(year(ls_date)+sign(month(ls_date) -12)+1,mod(month(ls_date)+1,13)+
abs
(sign(mod(month(ls_date)+1,13)) -1),1),-1)
b.
RelativeDate(date(year(ls_date)+integer(month(ls_date)/12),mod(month(ls_date),12)+1,1),-1)
a.
day(RelativeDate (date(year(ls_date)+sign(month(ls_date) -12)+1,mod(month(ls_date)+1,13)+
abs
(sign(mod(month(ls_date)+1,13)) -1),1),-1))
b.
day(RelativeDate(date(year(ls_date)+integer(month(ls_date)/12),mod(month(ls_date),12)+1,1),-1))
'星期'
+mid(
'日一二三四五六'
,(mod(year(ls_date) -1 +
int
((year(ls_date) -1)/4) -
int
((year(ls_date) -1)/100) +
int
((year(ls_date) -1)/400) + daysafter(date(year(ls_date),1,1),ls_date)+1,7)+1)*2 -1,2)
date(year(ls_date)+
int
((month(ls_date)+ls_add_month)/13),
long
(mid(fill(
'010203040506070809101112'
,48),(mod(month(ls_date)+ls_add_month -1,12)+13)*2 -1,2)),day(ls_date) -integer(right(left(string(day(RelativeDate (date(year(ls_date)+
int
((month(ls_date)+ls_add_month)/13)+sign(
long
(mid(fill(
'010203040506070809101112'
,48),(mod(month(ls_date)+ls_add_month -1,12)+13)*2 -1,2)) -12)+1,mod(
long
(mid(fill(
'010203040506070809101112'
,48),(mod(month(ls_date)+ls_add_month -1,12)+13)*2 -1,2))+1,13)+
abs
(sign(mod(
long
(mid(fill(
'010203040506070809101112'
,48),(mod(month(ls_date)+ls_add_month -1,12)+13)*2 -1,2))+1,13)) -1),1),-1)) -day(ls_date),
'00'
)+
'00000'
,5),3))/100)
abs
(
int
(-((daysafter( RelativeDate(date(year(ls_date),1,1), -mod(year(ls_date) -1 +
int
((year(ls_date) -1)/4) -
int
((year(ls_date) -1)/100) +
int
((year(ls_date) -1)/400) + 1,7) +1),ls_date)+1)/7)))
abs
(
int
(-((daysafter( RelativeDate(date(year(ls_date),1,1), -DayNumber(date(year(ls_date),1,1))+1),ls_date)+1)/7)))
abs
(
int
(-((daysafter( RelativeDate(date(year(ls_date),1,1), -integer(mid(
'6012345'
,mod(year(ls_date) -1 +
int
((year(ls_date) -1)/4) -
int
((year(ls_date) -1)/100) +
int
((year(ls_date) -1)/400) + 1,7),1))),ls_date)+1)/7)))
abs
(
int
(-((daysafter( RelativeDate(date(year(ls_date),1,1), -integer(mid(
'6012345'
,DayNumber(date(year(ls_date),1,1)),1))),ls_date)+1)/7)))
abs
(
int
(-((daysafter( RelativeDate(ls_date_2, -mod(year(ls_date_2) -1 +
int
((year(ls_date_2) -1)/4) -
int
((year(ls_date_2) -1)/100) +
int
((year(ls_date_2) -1)/400) + daysafter(date(year(ls_date_2),1,1),ls_date_2)+ 1,7) +1),ls_date_1)+1)/7)))
abs
(
int
(-((daysafter( RelativeDate(ls_date_2, -DayNumber(ls_date_2)+1),ls_date_1)+1)/7)))
abs
(
int
(-((daysafter( RelativeDate(ls_date_2, -integer(mid(
'6012345'
,mod(year(ls_date_2) -1 +
int
((year(ls_date_2) -1)/4) -
int
((year(ls_date_2) -1)/100) +
int
((year(ls_date_2) -1)/400) + daysafter(date(year(ls_date_2),1,1),ls_date_2)+ 1,7) ,1))),ls_date_1)+1)/7)))
abs
(
int
(-((daysafter( RelativeDate(ls_date_2, -integer(mid(
'6012345'
,DayNumber(ls_date_2),1))),ls_date_1)+1)/7)))