Skip to main content
3 of 4
added 38 characters in body
ngm
  • 4.3k
  • 7
  • 29

What will be on the top of this decorative calendar?

Someone gave my wife a decorative calendar consisting of four cubes. Here it is showing today's date (as of the posting of this challenge) on the front:

enter image description here

When I first saw it, I looked at it from the wrong angle (from directly above) and couldn't figure out why it gave this information:

[["February", "January"], [3], [7], ["Monday", "Tuesday"]]

Your job is to replicate my error for any date in 2019.

Challenge

Write a program or function that takes any date from 2019, and outputs what appears on the top of all the cubes when that date is displayed facing out from the front of the calendar.

Here are all six sides for all the cubes. To display a 6 you just turn the 9 upside down. The 0 is vertically symmetrical, so 0 upside down is still 0. There might be more than one correct answer for some dates (e.g. any 11th of any month will have more than one way to use the cubes, and the 0 thing) so you can output any correct answer.

enter image description here

Rules

  1. Standard loopholes forbidden.
  2. Input/output format is flexible.
  3. The output does have to be in order by cube, but not within a cube. The order must be month cube first, then the two number cubes, followed by the weekday cube. But when a cube has two elements on top, those two elements can be in either order.
  4. You can replace January to December 0-11 or 1-12 if you like.
  5. You can replace the days of the week with 0-6 or 1-7 if you like, and you can start the week on either Sunday or Monday (but you can't start the week on any other day - this is PPGC, not some sort of crazy-town.)
  6. This is . Fewest bytes for each language wins.
  7. Explanations encouraged.

Test cases

(Tue) 2019-01-29   [[ "July", "August" ], [3], [7], [ "Thursday", "Wednesday" ]]
                   [[ "August", "July" ], [3], [7], [ "Wednesday", "Thursday" ]]

                   etc. since the order within each cube doesn't matter.
             

(Thu) 2019-07-11   [[ "May", "June" ], [3], [8], [ "Saturday", "Friday" ]]
                   [[ "May", "June" ], [8], [3], [ "Saturday", "Friday" ]]

                   since the two 1 cubes could be either way.

(Sun) 2019-10-27   [[ "January", "February" ], [3], [6https://www.linuxmint.com/start/sylvia/], [ "Friday", "Saturday" ]]

(Wed) 2019-05-01   [[ "March", "April" ], [8], [3], [ "Monday", "Tuesday" ]]
                   [[ "March", "April" ], [6], [3], [ "Monday", "Tuesday" ]]
                   [[ "March", "April" ], [9], [3], [ "Monday", "Tuesday" ]]

                   since the 0 cube could have either the 8 side or the 6 side facing up, and the 6 could also be considered a 9.


(Sat) 2019-08-24   [[ "February", "January" ], [8], [5], [ "Sunday" ]]
ngm
  • 4.3k
  • 7
  • 29