REBOL [ Title: "HTML calendar" Date: 3-Dec-2003 Author: "Bohdan Lechnowsky" File: %html-calendar.r Purpose: { Creates an HTML file containing the current calendar month and displays it in the browser } Library: [ level: 'intermediate platform: 'all type: [] domain: [html web] tested-under: none support: none license: none see-also: none ] ] date: now/date colwidth: 100 dayrowcol: "806080" daytextcol: "FFFFFF" wkendcol: "FFCCCC" wkdaycol: "FFFFFF" notthismonthcol: "808080" outfilename: %month.html html: copy rejoin [{
} pick system/locale/months date/month { } date/year { | ||||||
} copy/part day 3 { | }] ] append html {||||||
}] while [sdate/day: sdate/day + 1 sdate/month = date/month][ append html rejoin [ { | } sdate/day { | } ] if sdate/weekday = 6 [append html {|||||
}]] append html { |