Runtime evaluation/In an environment: Difference between revisions

(→‎{{header|Tcl}}: provide another solution for clarified requirements)
Line 81:
; ok
</lang>
 
=={{header|Groovy}}==
<lang groovy>
Eval.x(2008..2121, '''
inFormat = new java.text.SimpleDateFormat("yyyy-MM-dd")
checkFormat = new java.text.SimpleDateFormat("EEE")
result = []
x.each {
Date date = inFormat.parse("${it}-12-25")
if (checkFormat.format(date) == "Sun") result.add it
}
print result
''')
</lang>
 
Output:
<pre></pre>
 
=={{header|Metafont}}==
Anonymous user