Last Friday of each month: Difference between revisions
Content added Content deleted
(→{{header|Perl 6}}: slight twiddle) |
m (→{{header|PHP}}) |
||
Line 515: | Line 515: | ||
PHP is generally used for web apps, so I am not implementing the command-line component of this task. |
PHP is generally used for web apps, so I am not implementing the command-line component of this task. |
||
<lang PHP> |
<lang PHP><?php |
||
<?php |
|||
function last_friday_of_month($year, $month) { |
function last_friday_of_month($year, $month) { |
||
$day = 0; |
$day = 0; |
||
Line 537: | Line 536: | ||
$year = 2012; |
$year = 2012; |
||
print_last_fridays_of_month($year); |
print_last_fridays_of_month($year); |
||
?> |
?></lang> |
||
</lang> |
|||
Output in browser: |
Output in browser: |
||
< |
<pre> |
||
2012-01-27 |
2012-01-27 |
||
2012-02-24 |
2012-02-24 |
||
Line 553: | Line 552: | ||
2012-11-30 |
2012-11-30 |
||
2012-12-28 |
2012-12-28 |
||
</ |
</pre> |
||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |