AI
Animation
CGI
Compression
Console
Database
Debug
Dialects
Dialogs
Editor
Email
Encryption
Extension
External Library
File
File Handling
Files
Financial
FTP
Game
Games
Graphics
GUI
HTML
HTTP
Internet
LDC
Markup
Math
Module
Network
Networking
None
Other - Net
Parse
Patch
Printing
Protocol
Rebol
Scheme
Scientific
SDK
Security
Shell
Sound
SQL
TCP
Testing
Text
Text Processing
UI
User Interface
Util
Utility
VID
Visualization
Web
Win API
X-File
XML
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 [{}]

days: head remove back tail insert head copy system/locale/days last system/locale/days

foreach day days [
	append html rejoin [{}]
]

append html {}

sdate: date
sdate/day: 0

loop sdate/weekday // 7 + 1 [append html {}]

while [sdate/day: sdate/day + 1 sdate/month = date/month][
	append html rejoin [
		{}
	]
	if sdate/weekday = 6 [append html {}]
]

loop 7 - sdate/weekday [append html rejoin [{}]]

append html {
} pick system/locale/months date/month { } date/year {
} copy/part day 3 {
} sdate/day {
} write outfilename html browse outfilename
Copyright © 2018 Rebol Software Foundation