Calendar <_ tag = 0 id = outset > taskwin #exepath#\#exename#.log <_ tag = 0 id = taskstate > no 200 <_ tag = 0 id = gettime > dt <_ tag = 0 id = form > 1 <_ > edit Enter a year dtyear 150 <_ tag = 0 id = taskstate > min <_ tag = 0 id = sources expanded = 2 > <_ tag = 0 id = empty > 1 text calendar( uint year ) \{ datetime stime stime.setdate( 1, 1, year ) } Calendar for year \(stime.year)&x3c;/TITLE> <STYLE TYPE="text/css"> <!-- BODY {background: #FFF; font-family: Verdana;} H1 {text-align: center; margin: 5px;} TABLE {border: 0; border-spacing: 7px;} TD {padding: 3px; border: 1px solid; text-align: center;} #copy {font-size: smaller; text-align: center;} --> &x3c;/STYLE> &x3c;/HEAD> <BODY><H1>\(stime.year)&x3c;/H1> <TABLE ALIGN=CENTER>\{ uint i j k month dayofweek firstday str stemp firstday = firstdayofweek() dayofweek = stime.dayofweek fornum i = 0, 4 { @"\l<TR>" fornum j = 1, 4 { month = i * 3 + j @"\l<TD>\(nameofmonth( stemp, month )) <PRE>" fornum k = firstday, firstday + 7 { @" \( abbrnameofday( stemp, k ).setlen( 2 ))" } @" \l" @" ".repeat( ( 7 + dayofweek - firstday ) % 7 ) uint day = 1 uint lines while day <= daysinmonth( year, month ) { if !dayofweek : @"<FONT COLOR=red>" @str( day++ ).fillspacel( 4 ) if !dayofweek : @"&x3c;/FONT>" dayofweek = ( dayofweek + 1 ) % 7 if dayofweek == firstday { @" \l" lines++ } } @" ".repeat( ( 7 + firstday - dayofweek ) % 7 ) while lines++ < 7 : @" \l" @"&x3c;/PRE>" } } } &x3c;/TABLE> <BR><DIV id="copy">Generated with Perfect Automation&x3c;/DIV> &x3c;/BODY>&x3c;/HTML>\!</> </> <_ tag = 0 id = sources expanded = 2 > <children > <_ tag = 0 id = empty ></> </> <desc ></> <ext >0</> <src >str out out@calendar( defmacro.getint("dtyear")) defmacro.set( "calendar", out )</> </> <_ tag = 0 id = writevar > <desc ></> <filelist > <rows > <_ > <varname >calendar</> <name >#exepath#\calendar.htm</> <append ></> </> </> </> </> <_ tag = 0 id = shell > <desc ></> <name >#exepath#\calendar.htm</> </> <_ tag = 0 id = exit > <desc ></> <extype >exit</> <code >1</> <msg ></> </> </> <desc ></> <exefile ></> <outdir ></> <icofile ></> <state >show</> <author >2008 Alexey Krivonogov</> <website >http://www.perfectautomation.com</> <version >1.0</> </>