New answers tagged

0

JavaScript, 539 bytes (L,A,S,N)=>`${N} day${N>1?'s':''}${N>6?`, namely ${~~(N/7)} week${~~(N/7)>1?'s':''} ${N%7?`${N%7} day${N%7>1?'s':''}`:''}`:''} ${(t=0)||L.map((e,i)=>i==3?e.replace(/./g,c=>(/\.| |\,/.test(c)?t:++t)==N?`{${c}}`:c):e).join` `.split` `.map((e,i)=>i==N-1?`[${e.replace(z=/\.| \,/,'')}]${z.test(e)?e.slice(-1):''}`:...


3

Retina 0.8.2, 323 bytes ^.+ $* ^(1(1{7})*(1)*[\w\W]*¶¶)(?=(?<-3>.+¶)*(.+))(?<-2>.+¶)*(.+)(¶.+)* $1$4 in $5 ^((1{7})*(1)?(1)*¶(¶.+)+¶(?<-2>.*¶)*)(?(3)(.*¶(?<-4>\w+\W+)*)(\w+)|(.+)) $1$6<$7$8> ^(1(1)*¶¶(?<-2>\w+\W+)*)(\w+) $1<$3> ^(1(1)*¶¶(.+¶){3}<?(?<-2>\w\W*)*)(\w) $1{$4} ^(1{7})*(1)* $.& days, namely $#...


4

Python 3, 365 bytes import re i=N=int(input()) p=print Y=N//7 Z=N%7 p(N,"day"+"s"*(N>1)+(f", namely {Y} week{'s'*(N>13)}"+f" {Z} day{'s'*(Z>1)}"*(Z>0))*(N>6)) s="[]" def a(x):global i;i-=1;x=x.group();return i and x or x.join(s) b=re.sub L=b("\w+",a,L).split("\n") if Z:i=N-...


Top 50 recent answers are included