Challenge
On each of the 12 days of Christmas, output the appropriate verse of "12 days of Christmas", according to the date, otherwise output the chorus of "I Wish It Could Be Christmas Everyday".
Leading and/or trailing newlines (\n
) and trailing spaces are permitted. You may not read from any external sources.
Basically what you have to do is read the system date and output the according verse of the "12 days of Christmas".
12 Days of Christmas
The Twelve Days of Christmas is the festive Christian season, beginning on Christmas Day (25 December) and ending on the 5th of January.
Examples
If the date is the 25th of December (print out the shortest/first verse):
On the first day of Christmas
my true love sent to me:
a Partridge in a Pear Tree
If the date is the 31st of December (print the seventh verse):
On the seventh day of Christmas
my true love sent to me:
7 Swans a Swimming
6 Geese a Laying
5 Golden Rings
4 Calling Birds
3 French Hens
2 Turtle Doves
and a Partridge in a Pear Tree
If the date is the 5th of January (print out the longest/last/12th verse):
On the twelth day of Christmas
my true love sent to me:
12 Drummers Drumming
11 Pipers Piping
10 Lords a Leaping
9 Ladies Dancing
8 Maids a Milking
7 Swans a Swimming
6 Geese a Laying
5 Golden Rings
4 Calling Birds
3 French Hens
2 Turtle Doves
and a Partridge in a Pear Tree
If the date is not within the range of 25th December to 5th January inclusive:
Well I wish it could be Christmas every day
When the kids start singing and the band begins to play
Oh I wish it could be Christmas every day
So let the bells ring out for Christmas