Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
62
Task/Discordian-date/Refal/discordian-date.refal
Normal file
62
Task/Discordian-date/Refal/discordian-date.refal
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
$ENTRY Go {
|
||||
, <Numb <Arg 1>>: s.GY
|
||||
, <Numb <Arg 2>>: s.GM
|
||||
, <Numb <Arg 3>>: s.GD
|
||||
, <DisDate s.GY s.GM s.GD>: {
|
||||
True e.Desc = <Prout e.Desc>;
|
||||
False = <Prout 'Invalid input'>;
|
||||
};
|
||||
};
|
||||
|
||||
DisDate {
|
||||
s.GY 2 29, <IsLeapYear s.GY>: True =
|
||||
True 'St. Tib\'s day in the YOLD ' <Symb <+ 1166 s.GY>>;
|
||||
|
||||
s.GY s.GM s.GD, <Compare s.GM 1>: '-' = False;
|
||||
s.GY s.GM s.GD, <Compare s.GM 12>: '+' = False;
|
||||
s.GY s.GM s.GD, <Compare s.GD 1>: '-' = False;
|
||||
s.GY s.GM s.GD, <Compare s.GD <Item s.GM <MonthLength>>>: '+' = False;
|
||||
|
||||
s.GY s.GM s.GD,
|
||||
<+ <Item s.GM <MonthOffset>> s.GD>: s.DOY,
|
||||
<Divmod <- s.DOY 1> 73>: (s.DS1) s.DD1,
|
||||
<+ s.DS1 1>: s.DS,
|
||||
<+ s.DD1 1>: s.DD,
|
||||
<+ <Mod <- s.DOY 1> 5> 1>: s.DWD,
|
||||
|
||||
<Item s.DWD <Weekday>>: (e.Weekday),
|
||||
<Item s.DS <Seasons>>: (e.Season),
|
||||
|
||||
e.Weekday ', day ' <Symb s.DD> ' of '
|
||||
e.Season ' in the YOLD ' <Symb <+ 1166 s.GY>>: e.Desc,
|
||||
s.DD: {
|
||||
5, <Item s.DS <Holy5>>: (e.H) = True e.Desc ': celebrate ' e.H;
|
||||
50, <Item s.DS <Holy50>>: (e.H) = True e.Desc ': celebrate ' e.H;
|
||||
s.X = True e.Desc;
|
||||
};
|
||||
};
|
||||
|
||||
Item {
|
||||
1 t.I e.X = t.I;
|
||||
s.N t.I e.X = <Item <- s.N 1> e.X>;
|
||||
};
|
||||
|
||||
IsLeapYear {
|
||||
s.GY, <Mod s.GY 4>: 0 = True;
|
||||
s.GY, <Mod s.GY 100>: 0 = False;
|
||||
s.GY, <Mod s.GY 400>: 0 = True;
|
||||
s.GY = False;
|
||||
};
|
||||
|
||||
MonthOffset { = 0 31 59 90 120 151 181 212 243 273 304 334; };
|
||||
MonthLength { = 31 28 31 30 31 30 31 31 30 31 30 31; };
|
||||
|
||||
Weekday { = ('Sweetmorn') ('Boomtime') ('Pungenday')
|
||||
('Prickle-Prickle') ('Setting Orange'); };
|
||||
|
||||
Seasons { = ('Chaos') ('Discord') ('Confusion') ('Bureaucracy')
|
||||
('The Aftermath'); };
|
||||
|
||||
Holy5 { = ('Mungday') ('Mojoday') ('Syaday') ('Zaraday') ('Maladay'); };
|
||||
Holy50 { = ('Chaoflux') ('Discoflux') ('Confuflux')
|
||||
('Bureflux') ('Afflux'); };
|
||||
Loading…
Add table
Add a link
Reference in a new issue