Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcmarco’s picture

FileSize
370 bytes
merlinofchaos’s picture

Status: Needs review » Needs work

The '%%d' is not a typo. It is there because '%d' will get processed by db_query() and will mess up any arguments to the query.

jcmarco’s picture

Category: bug » feature
Status: Needs work » Needs review
FileSize
1.3 KB

Ok, I found it while testing with more strings.
I even found that %b requires to be escaped as well.

Changed for a feature request to support more strings.

I am working in a patch for views_handler_field_date.inc to support
date formats configured with Data API, and option to support native
date_format in queries to solve problems grouping information.

jcmarco’s picture

Title: views_date_sql_format has a typo with days » Add more date format string to views_date_sql_format
merlinofchaos’s picture

It would be true for %b, %d, %s, %f -- I see a %s in there too. Odd that %d was covered and %s was not.

jcmarco’s picture

You were absolutely right!

The %s was wrong.

I didn't translate %f as it seems that using microseconds is not usual.
Do you consider a good idea trying to translate all the strings from http://us.php.net/manual/en/function.date.php?

robby.smith’s picture

subscribing

merlinofchaos’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Status: Needs review » Patch (to be ported)

Unsurprisingly, this does not apply to D7. COmmitted to D6 branches.

dawehner’s picture

Status: Patch (to be ported) » Fixed

Ported and commited.

Status: Fixed » Closed (fixed)

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