805333 发表于 2011-3-9 02:58:05

已有 4 人购买  本主题需向作者支付 5 铜板 才能浏览 购买主题

suqunmu 发表于 2011-3-9 03:14:34

汗这么贵啊

suqunmu 发表于 2011-3-9 03:15:05

太黑了把,太黑了把

805333 发表于 2011-3-9 03:18:10

没办法啊,缺钱花啊

qq3475534 发表于 2011-3-14 00:31:39

这么贵啊。。。。

peckpock 发表于 2011-3-14 08:55:22

路过帮顶...没铜板...

zhjchina 发表于 2011-3-14 09:21:51

# Calculates day of the week for a givien date
# Month: jan,feb ... nov,dec   (must be lower-case)
# Day: 1 - 31
# Year: 1900 - 2999
# mmm/dd/yyyy   same format as
# (ex. jul/22/2009)

:local date



# Math Calculation here
:local result ""
:local months [:toarray "jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec"]
:local monthtbl [:toarray "0,3,3,6,1,4,6,2,5,0,3,5"]
:local daytbl [:toarray "sun,mon,tue,wed,thu,fri,sat"]

:local month [:pick $date 0 3]
:local day [:pick $date 4 6]
:local dayc [:pick $date 5 6]
:local century [:pick $date 7 9]
:local year [:pick $date 9 11]
:local yearc [:pick $date 10 11]

# if the first char is a 0 (zero) only read last char, else script fails
:if ([:pick $date 4 5] = 0) do={ :set day ($dayc)}
:if ([:pick $date 9 10] = 0) do=[:set year ($yearc)]

:local sum 0
:set sum ($sum + (2 * (3 - ($century - (($century / 4) * 4)))))
:set sum ($sum + ($year / 4))
:set sum ($sum + $year + $day)
:for mindex from=0 to=[:len $months] do={
:if ([:pick $months $mindex] = $month) do={:set sum ($sum + [:pick $monthtbl $mindex]) }
}
:set sum ($sum - (($sum / 7) * 7))
:set result [:pick $daytbl $sum]

# END Math Calculation

:put ([:pick $date 0 3] . "/" . [:pick $date 4 6] . "/" . [:pick $date 7 9] . [:pick $date 9 11] . " is on a " . $result)
不知道是不是这个脚本

kyer2012 发表于 2011-3-14 09:28:40

不知道这个脚本有什么作用的呢!

qbs315 发表于 2011-3-15 03:40:35

:')真够黑的。

zsq2329 发表于 2012-11-14 20:56:49

感谢7楼。
不是不想买,实在是穷……

huigezi' 发表于 2012-11-16 09:07:40

蔡勒公式换算而已 这也收铜板
页: [1]
查看完整版本: 发个官方判断星期几的脚本