Subversion Repositories wimsdev

Rev

Rev 17035 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17035 Rev 17665
Line 17... Line 17...
17
!else
17
!else
18
  !goto $type_
18
  !goto $type_
19
!endif
19
!endif
20
 
20
 
21
:whatday
21
:whatday
22
!! use Mike Keith algorythm (year must be between 1583 and 9999) 
22
!! use Mike Keith algorythm (year must be between 1583 and 9999)
23
!! 1=Monday etc...
23
!! 1=Monday etc...
24
!ifval $m_=1 or $m_=2 
24
!ifval $m_=1 or $m_=2
25
  c_=1
25
  c_=1
26
!else
26
!else
27
  c_=0
27
  c_=0
28
!endif
28
!endif
29
A_ = $[$a_ - $c_]
29
A_ = $[$a_ - $c_]
Line 77... Line 77...
77
!exit
77
!exit
78
 
78
 
79
:endmonth
79
:endmonth
80
l_=!item $m_ of $l_
80
l_=!item $m_ of $l_
81
!ifval $m_=2 and $a_%4=0 and ($a_%400=0 or $a_%100!=0)
81
!ifval $m_=2 and $a_%4=0 and ($a_%400=0 or $a_%100!=0)
82
    l_=29
82
  l_=29
83
!endif
83
!endif
84
output=$[$l_-$j_+1]
84
output=$[$l_-$j_+1]
85
!exit
85
!exit