Created
June 24, 2010 00:47
-
-
Save iammerrick/450807 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function get_relative_month() | |
{ | |
$count = 31; // Generally 31 days in a month. | |
$month = array(); | |
for ($i = 0; $i < $count; $i++) | |
{ | |
if(($i % $count) < ($count / 2)) | |
{ | |
$month[self::subtract_day($i)] = date('j', self::subtract_day($i)); | |
} | |
else | |
{ | |
$month[self::add_day($i)] = date('j', self::add_day($i)); | |
} | |
} | |
return $month; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment