Class Date_Human

Description

Class to convert date strings between Gregorian and Human calendar formats.

The Human Calendar format has been proposed by Scott Flansburg and can be explained as follows: The year is made up of 13 months Each month has 28 days Counting of months starts from 0 (zero) so the months will run from 0 to 12 New Years day (00) is a monthless day Note: Leap Years are not yet accounted for in the Human Calendar system

Located in /maintenance/libraries/pear/Date/Human.php (line 36)


	
			
Method Summary
 associative gregorianToHuman (int $day, int $month, int $year)
 int HumanToGregorian (int $day, int $month, int $year)
Methods
gregorianToHuman (line 66)

Returns an associative array containing the converted date information in 'Human Calendar' format.

  • return:

    array( hdom, // Human Day Of Month, starting at 1 hdow, // Human Day Of Week, starting at 1 hwom, // Human Week of Month, starting at 1 hwoy, // Human Week of Year, starting at 1 hmoy, // Human Month of Year, starting at 0 )

    If the day is New Years Day, the function will return "hdom" => 0 "hdow" => 0 "hwom" => 0 "hwoy" => 0 "hmoy" => -1 Since 0 is a valid month number under the Human Calendar, I have left the month as -1 for New Years Day.

  • access: public
associative gregorianToHuman (int $day, int $month, int $year)
  • int $day: day in DD format, default current local day
  • int $month: month in MM format, default current local month
  • int $year: year in CCYY format, default to current local year
HumanToGregorian (line 158)

Returns unix timestamp for a given Human Calendar date

  • return: unix timestamp of date
  • access: public
int HumanToGregorian (int $day, int $month, int $year)
  • int $day: day in DD format
  • int $month: month in MM format
  • int $year: year in CCYY format, default to current local year

Documentation generated on Fri, 10 Dec 2004 18:25:39 +0000 by phpDocumentor 1.3.0RC3