In date_is_all_day(), if $granularity is 'hour', 'minute', or 'second', it will return FALSE. It seems to me that if the granularity is day, month, or year, it ought to return TRUE because the date must be all day if the granularity does not include time information. Am I misunderstanding something or is there a bug here?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam Morland created an issue. See original summary.

Liam Morland’s picture

Perhaps date_is_all_day() should return TRUE for values less granular than 'hour'. Making this change does not cause any test failures in MySQL. Failures in SQLite and Postgres are in the branch result.

ebremner’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed the code and makes sense for this change.

DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed
Parent issue: » #2867810: Plan for Date 7.x-2.11 release

Committed. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.