/** * Gets start date. * @param string $dateRangeType * @return string */ public static function getStartDate($dateRangeType) { assert('is_string($dateRangeType)'); if ($dateRangeType == SavedCalendar::DATERANGE_TYPE_MONTH) { return DateTimeUtil::getFirstDayOfAMonthDate(); } if ($dateRangeType == SavedCalendar::DATERANGE_TYPE_WEEK) { return DateTimeUtil::getFirstDayOfAWeek(); } if ($dateRangeType == SavedCalendar::DATERANGE_TYPE_DAY) { return DateTimeUtil::getTodaysDate(); } }