-1 thanks to user202729 (use the ⁽
quick I implemented about a month after this answer.)
Ḋ€;⁽¥Ñj”.
“£hṅ’ṃ“þœ÷‘R,€"J$;/m7+³DÇ€Y
Jelly currently has no date type or way of representing a date natively, so a purely numeric approach is required.
Try it online!
How?
Ḋ€;⁽¥Ñj”. - Link 1, format helper: list of lists e.g. [[x,0,2],[x,0,7]] (for 2nd July)
Ḋ€ - dequeue €ach [[0,2],[0,7]]
⁽¥Ñ - literal 2017 2017
; - concatenate [[0,2],[0,7],2017]
”. - character '.'
j - join [0,2,'.',0,7,'.',2017]
which has the representation: "02.07.2017"
“£hṅ’ṃ“þœ÷‘R,€"J$;/m7+³DÇ€Y - Main link: no arguments
“£hṅ’ - base 250 compressed number 213991
“þœ÷‘ - code-page indexes [31,30,28]
ṃ - base decompression: 213991 base length([31,30,28])
= [1,0,1,2,1,2,1,1,2,1,2,1]; indexed into [31,30,28]
= [31,28,31,30,31,30,31,31,30,31,30,31]
R - range (vectorises): [[1,2,...,31],[1,2,...,28],...]
$ - last two links as a monad:
J - range(length): [1,2,3,4,5,6,7,8,9,10,11,12]
" - zip with:
,€ - pair for €ach: [[[1,1],[2,1],...,[31,1]],[[1,2],[2,2],...,[28,2]],...]
;/ - reduce with concatenation: [[1,1],[2,1],...,[31,1],[1,2],[2,2],...,[28,2],...]
m7 - every 7th item: [[1,1],[8,1],...,[24,12],[31,12]]
³ - 100
+ - add (vectorises): [[101,101],[108,101],...[124,112],[131,112]]
D - to decimal (vectorises): [[[1,0,1],[1,0,1]],[[1,0,8],[1,0,1]],...,[[1,2,4],[1,1,2]],[[1,3,1],[1,1,2]]]
Ç€ - call last link as a monad for €ach: [[0,1,'.',0,1,'.',2017],[0,8,'.',0,1,'.',2017],...,[2,4,'.',1,2,'.',2017],[3,1,'.',1,2,'.',2017]]
Y - join with line feeds: [0,1,'.',0,1,'.',2017,'\n',0,8,'.',0,1,'.',2017,'\n',...,'\n',2,4,'.',1,2,'.',2017,'\n',3,1,'.',1,2,'.',2017]
- implicit print
1
Possible dupe of Plan your Sundays? This one is a specific year though.
– xnor – 2017-04-13T03:19:47.1571
I checked out Plan your Sundays before posting, but it asks to print the Sundays in a given month. @xnor
– ShinMigami13 – 2017-04-13T03:21:27.2801Any particular reason for that specific output format? You could open in up a bit. – Rɪᴋᴇʀ – 2017-04-13T03:22:20.657
I'm newbie here, please help me add that @Riker – ShinMigami13 – 2017-04-13T03:22:36.167
@xnor was it a ninja edit? I don't see it in the rev history. And Patrick commented, is this some magic I don't know about? – Rɪᴋᴇʀ – 2017-04-13T03:22:46.797
4I actually like this as an exact-text kolmogorov challenge. Getting the date formatting right has some interesting optimizations. – xnor – 2017-04-13T03:23:07.027
@Riker There is a 5-minute grace period, so the edit could have ninja'd there, but then how does the top comment contain the [tag:code-golf] tag? Since comments override the grace period, it seems strange... unless there was a [tag:code-golf] tag before the comment, which seems strange again because OP's reply says "Added tags[...]". There might have been some 11 around, since mods can delete revisions, but then that's only used when there's an absolute emergency. Can't find an explanation, and the first revision does indeed have a [tag:code-golf] tag. Something's gone crazy... – Erik the Outgolfer – 2017-04-13T08:19:03.767
5Anyways, I think the close votes should be retracted. – Erik the Outgolfer – 2017-04-13T08:28:10.110
Is a trailing newline accepted? – IQuick 143 – 2018-05-12T06:11:57.637