Hi,

The module is hard-coding american date formats in redhen_filter_form, which is an issue for international users! Could we please change this so that it is something you can set? Or uses drupal default date formats?

Thanks,
Pete

Comments

levelos’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

freakalis’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs work

I think this issue is still active because the way format_date() handles medium format. If a custom format is set when using type medium it always uses the custom format. (don't really know why). https://api.drupal.org/api/drupal/includes%21common.inc/function/format_...

In includes/redhen.forms.inc

$default_value = isset($_GET['properties'][$key]) ? $_GET['properties'][$key] : NULL;
if ($prop['type'] == 'date' && !empty($default_value)) {
  $default_value['from'] = ($default_value['from'] == '') ? '' :
    format_date(strtotime($default_value['from']), 'medium', 'm/d/Y');
  $default_value['to'] = ($default_value['to'] == '') ? '' :
    format_date(strtotime($default_value['to']), 'medium', 'm/d/Y');
}

We should either switch from using type medium to short OR remove format 'm/d/Y'.

  • Commit 5e214f4 on 7.x-1.x, tests, redhen-donation by levelos:
    #1962540 by levelos: Use format_date() when formatting date strings in...

  • Commit 5e214f4 on 7.x-1.x, tests, redhen-donation, relation-roles by levelos:
    #1962540 by levelos: Use format_date() when formatting date strings in...

  • levelos committed 5e214f4 on relation-roles
    #1962540 by levelos: Use format_date() when formatting date strings in...
levelos’s picture

Status: Needs work » Fixed

Good catch, fixed.

  • levelos committed ba691e0 on 7.x-1.x
    #1962540: American date hardcoded.
    

Status: Fixed » Closed (fixed)

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

edward.peters’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Closed (fixed) » Needs review

Isn't this still an issue? So far as I can see, the date format is hard-coded to US format, and as a European I badly need it to be configurable for other formats so that I don't have to hack the module (as I have done so far). Any advice/help welcome.

levelos’s picture

Status: Needs review » Closed (fixed)

@edward.peters, I do not believe it is anymore.