Last Friday of each month: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: removed some blank lines, changed box gylphs. -- ~~~~) |
|||
Line 425: | Line 425: | ||
=={{header|Mathematica}}== |
=={{header|Mathematica}}== |
||
<lang Mathematica>Needs["Calendar`"] |
<lang Mathematica>Needs["Calendar`"] |
||
FridaysOfTheYear[Y_] := Cases[Map[{#,DayOfWeek[#]}&,DaysPlus[{Y,1,2}, #]&/@Range[365],{1}], |
FridaysOfTheYear[Y_] := Cases[Map[{#,DayOfWeek[#]}&,DaysPlus[{Y,1,2}, #]&/@Range[365],{1}],{x_,Friday}->x]; |
||
Last[SortBy[Cases[FridaysOfTheYear[2011], {_,#,_}], #[[3]] &]]& /@ Range[12] // Column</lang> |
Last[SortBy[Cases[FridaysOfTheYear[2011], {_,#,_}], #[[3]] &]]& /@ Range[12] // Column</lang> |
||
Output: |
Output: |