With a current CVS checkout, the 'Node: Posted Month' argument gives a value that is off by 1. For example, if I supply '9' it shows up as August.

I just used this little hack to fix the problem. Sorry I don't have time to prepare and upload a patch, but it's a very trivial change so I hope that's OK.

- $month = str_pad($query, 2, '0', STR_PAD_LEFT);
+ $month = str_pad($query, 2, '0', STR_PAD_LEFT) + 1;

Ta!

Comments

merlinofchaos’s picture

Check for me and save me some time:

Does instead changing "2005{$month}01" to "2005{$month}15" on the next line also fix the problem?

telex4’s picture

Yep! :)

merlinofchaos’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
dianacastillo’s picture

Version: 6.x-2.x-dev » 6.x-2.12
Status: Closed (fixed) » Needs work

If you use M for a custom date in Views it puts the wrong month when it is the first of the month .

For example if the date is 4/1 it prints March 1

if you put "m" instead it works fine.

any other date other than the first also works okay , 4/2 prints April 2

has anyone else come across this and is there a solution?

I cant use the solution listed here because the problem only happens on the first of the month, not every day.

Chris Matthews’s picture

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

The Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue