I've added a variable for the date range separater so it can be easily swapped out in another module or theme, without someone have to duplicate the entire function.

This is only a small change, but would allow for more flexibility in the futre...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Bump...

Anonymous’s picture

Issue summary: View changes

Added details.

podarok’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs tests

all feature requests should be covered by tests

secondary issue - You should use hook_uninstall for deleting variable, introduced here

sandykadam’s picture

Status: Needs work » Needs review
FileSize
1.33 KB

@kye There is no need of adding separate variable, we can manage by theme variables. I have attached patch for same.

Status: Needs review » Needs work

The last submitted patch, 3: 1925774-3-sandykadam-fix-for-date-range-separator.patch, failed testing.

sandykadam’s picture

Status: Needs work » Needs review
FileSize
1.33 KB

Sorry ignore previous patch, uploaded incorrect file. Check attached updated patch.

Status: Needs review » Needs work

The last submitted patch, 5: 1925774-5-sandykadam-fix-for-date-range-separator.patch, failed testing.

sandykadam’s picture

Status: Needs work » Needs review
FileSize
1.33 KB

There is no test required for this so renaming the patch and resubmitting the patch.

andriyun’s picture

Status: Needs review » Needs work
andriyun’s picture

Status: Needs work » Needs review
Chris Matthews’s picture

Status: Needs review » Needs work

The 5 year old patch in #7 to date.module and date.theme does not apply to the latest 7.x-2.x-dev may be too old to reroll, but I went ahead and tagged the issue accordingly.

Checking patch date.module...
Hunk #1 succeeded at 97 (offset 11 lines).
Checking patch date.theme...
error: while searching for:
  $timezone = $variables['timezone'];
  $attributes_start = $variables['attributes_start'];
  $attributes_end = $variables['attributes_end'];

  $start_date = '<span class="date-display-start"' . drupal_attributes($attributes_start) . '>' . $date1 . '</span>';
  $end_date = '<span class="date-display-end"' . drupal_attributes($attributes_end) . '>' . $date2 . $timezone . '</span>';

error: patch failed: date.theme:314
error: date.theme: patch does not apply