젤리 , 79 78 77 바이트
-1 버그를 :) 수정하는 (인덱스를 찾을 수-전치을 미리 안, 역 게시해야한다, 그러나 우리가 할 수있는 꼬리가 아닌 머리)
-1 반사를 사용 ( ⁽©ṅB+30_2¦2
-> ⁽0ṗb4+28m0
)
⁽0ṗb4+28m0SRṁRƲœiµṪȮ%30%20«4ị“nḄƲf⁷»s3¤Ṗ,ị“£ṢtẒ⁽ẹ½MḊxɲȧėAṅ ɓaṾ¥D¹ṀẏD8÷ṬØ»Ḳ¤$K
결과를 인쇄하는 전체 프로그램
온라인으로 사용해보십시오!
방법?
나중에 이것을 업데이트합니다 ...
⁽©ṅB+30_2¦2SRṁRƲZœiµḢȮ%30%20«4ị“nḄƲf⁷»s3¤Ṗ,ị“...»Ḳ¤$K - Main Link: integer, n
⁽©ṅB+30_2¦2SRṁRƲZœi - f(n) to get list of integers, [day, month]
⁽©ṅ - compressed literal 2741
B - to a list of binary digits -> [ 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1]
+30 - add thirty [31,30,31,30,31,30,31,31,30,31,30,31]
¦ - sparse application...
2 - ...to indices: [2]
_ 2 - ...action: subtract two [31,28,31,30,31,30,31,31,30,31,30,31]
Ʋ - last four links as a monad - i.e. f(x):
S - sum x 365
R - range [1..365]
R - range x (vectorises) [[1..31],[1..28],...]
ṁ - mould like [[1..31],[32..59],...]
Z - transpose [[1,32,...],[2,33,...],...]
œi - 1st multi-dimensional index of n -> [day, month]
µḢȮ%30%20«4ị“nḄƲf⁷»s3¤Ṗ,ị“...»Ḳ¤$K - given [day, month] format and print
µ - start a new monadic chain - i.e. f(x=[day, month])
Ḣ - head -- get the day leaving x as [month])
Ȯ - print it (with no newline) and yield it
%30 - modulo by thirty
%20 - modulo by twenty
«4 - minimum of that and four
¤ - nilad followed by link(s) as a nilad:
“nḄƲf⁷» - dictionary words "standard"+" the" = "standard the"
s3 - split into threes = ["sta","nda","rd ","the"]
ị - index into
Ṗ - remove rightmost character
¤ - nilad followed by link(s) as a nilad:
“...» - dictionary words "January"+" February"+...
Ḳ - split at spaces = ["January","February",...]
ị - index into (vectorises across [month])
, - pair e.g. ["th", ["February"]]
K - join with spaces ["th ", "February"]
- print (implicitly smashes) th February