Anonymous user
Last Friday of each month: Difference between revisions
m
→{{header|Java}}: Nicer look, makes fewer assumptions about the values for the months in Calendar
m (→{{header|C++}}: {{libheader|Boost}}) |
m (→{{header|Java}}: Nicer look, makes fewer assumptions about the values for the months in Calendar) |
||
Line 148:
=={{header|Java}}==
{{works with|Java|1.5+}}
<lang java5>import java.
import java.util.Calendar;
import java.util.GregorianCalendar;
Line 176 ⟶ 177:
date.add(Calendar.DAY_OF_MONTH, -1);
}
String monthStr = new DateFormatSymbols().getShortMonths()[month];
}
}
}</lang>
Output (for <code>java LastFriday 2012</code>):
<pre>
=={{header|OCaml}}==
|