You are here

public static function BirthdaysBirthday::fromOffset in Birthdays 7

Creates a BirthdaysBirthday instance from an offset of dates from the current time. That does not include a year.

Parameters

$offset: The date offset as a signed integer.

Return value

A BirthdaysBirthday instance.

1 call to BirthdaysBirthday::fromOffset()
birthdays_field_views_handler_filter::birthdays_add_where in views/birthdays_field_views_handler_filter.inc
Adds a where clause on a birtdhay value.

File

./birthdays_birthday.inc, line 150
The BirthdaysBirthday class.

Class

BirthdaysBirthday
Converts between different data representations and do calculations on a birthday.

Code

public static function fromOffset($offset) {
  $time = REQUEST_TIME + intval($offset) * 24 * 60 * 60;
  return self::fromDate(0, date('m', $time), date('d', $time));
}