Datekeeper Calendar
A calendar object displaying the current month's 28-31 day calendar, as well as highlighting today's date.
Functions:
add(),
center(),
extract(),
first(),
ifelse(),
iter(),
last(),
lnum(),
mod(),
repeat(),
replace(),
rest(),
rjust(),
strcat(),
sub(),
switch(),
table(),
time(),
u().
Features:
color substitutions.
Compatibility:
TinyMUX.
Instructions
Copy and paste the below code into a compatible MUSH or MUX.
MUSHCode for Datekeeper Calendar
@create Datekeeper
@lock Datekeeper==me
&CREDITS Datekeeper=Caffeinator@SluggyMUX
@Desc Datekeeper=[center(%ch[switch(extract(time(),2,1),Jan,January,Feb,February,Mar,March,Apr,April,May,May,Jun,June,Jul,July,Aug,August,Sep,September,Oct,October,Nov,November,Dec,December)]%cn %cw[last(time())],26)]%cn%ch%cx%rSu %bMo %bTu %bWe %bTh %bFr %bSa%cn%r[u(gen_calendar,mod(add(sub(switch(first(time()),Sun,1,Mon,2,Tue,3,Wed,4,Thu,5,Fri,6,Sat,7),extract(time(),3,1)),35),7),switch(extract(time(),2,1),Jan,31,Feb,ifelse(mod(last(time()),4),28,29),Mar,31,Apr,30,May,31,Jun,30,Jul,31,Aug,31,Sep,30,Oct,31,Nov,30,Dec,31))]
&GEN_CALENDAR Datekeeper=[table(replace(strcat(repeat(|,%0),rest(iter(lnum(1,%1),|[rjust(##,2)]),|)),add(%0,extract(time(),3,1)),%ch%cg[rjust(add(0,extract(time(),3,1)),2)]%cn,|),3,21,|)]
@lock Datekeeper==me
&CREDITS Datekeeper=Caffeinator@SluggyMUX
@Desc Datekeeper=[center(%ch[switch(extract(time(),2,1),Jan,January,Feb,February,Mar,March,Apr,April,May,May,Jun,June,Jul,July,Aug,August,Sep,September,Oct,October,Nov,November,Dec,December)]%cn %cw[last(time())],26)]%cn%ch%cx%rSu %bMo %bTu %bWe %bTh %bFr %bSa%cn%r[u(gen_calendar,mod(add(sub(switch(first(time()),Sun,1,Mon,2,Tue,3,Wed,4,Thu,5,Fri,6,Sat,7),extract(time(),3,1)),35),7),switch(extract(time(),2,1),Jan,31,Feb,ifelse(mod(last(time()),4),28,29),Mar,31,Apr,30,May,31,Jun,30,Jul,31,Aug,31,Sep,30,Oct,31,Nov,30,Dec,31))]
&GEN_CALENDAR Datekeeper=[table(replace(strcat(repeat(|,%0),rest(iter(lnum(1,%1),|[rjust(##,2)]),|)),add(%0,extract(time(),3,1)),%ch%cg[rjust(add(0,extract(time(),3,1)),2)]%cn,|),3,21,|)]