Sha256: 175424b895fadf4e12af3bc0b252607fb370d00059d2e68f9476c18b066b767f
Contents?: true
Size: 475 Bytes
Versions: 75
Compression:
Stored size: 475 Bytes
Contents
<?php function meetup_day($year, $month, $which, $weekday) { $monthName = (DateTime::createFromFormat("!m", $month))->format('F'); if ($which != "teenth") { return new DateTime("$which $weekday of $monthName $year"); } $date = new DateTime("first $weekday of $monthName $year"); while ($date->format('F') == $monthName) { $date->modify("next $weekday"); if ($date->format('j') > 12) { return $date; } } }
Version data entries
75 entries across 75 versions & 1 rubygems