DT Plugin
ExpressionEngine 2, ExpressionEngine 3
Back to this add-on's main page
View Other Add-ons From Jerry Price
month=”-1”
Support Request
Verve - Webdesign und Grafik
|
Posted: 29 March 2017 06:10 AM |
|
|
|
Hi
In my install month=”-1” says January and not February today.
Am I missing something?
Thanks!
|
|
|
Werner Gusset
|
Posted: 29 March 2017 07:47 AM |
# 1
|
|
|
Hi
I am using
{exp:dt month="-1" ee_format="true" format="%F %Y"}
and this gives today as a result “March 2017”.
This would mean on May 31. a month=”-1” would give me “May” and not “April”, right?
Is there a way to get always a result that is 1 month behind?
On EE 2.11.7 - DT Plugin 1.4.3
|
|
|
jjpmann
|
Posted: 29 March 2017 09:48 AM |
# 2
|
|
|
I’ll need to dig into the function but it could be trying to find Feb 29 which was not a valid date this year.
|
|
|
Werner Gusset
|
Posted: 29 March 2017 09:55 AM |
# 3
|
|
|
Yes March 29. and month=”-1” makes March 1. because February 29. doesn’t exist this year.
It also would make wrong May 31. minus 1 month because April 31. doesn’t exist either.
Thanks for looking at it.
|
|
|
jjpmann
|
Posted: 29 March 2017 10:03 AM |
# 4
|
|
|
{exp:dt format="%F %Y" set="first day of -1 month"}
Try this
|
|
|
jjpmann
|
Posted: 29 March 2017 10:04 AM |
# 5
|
|
|
Verve - Webdesign und Grafik - 29 March 2017 06:10 AM Hi
In my install month=”-1” says January and not February today.
Am I missing something?
Thanks!
I may need more information to help debug the issue
|
|
|
Verve - Webdesign und Grafik
|
Posted: 29 March 2017 10:09 AM |
# 6
|
|
|
Hi
Thanks, this solved my problem.
Great support!
|
|
|
Werner Gusset
|
Posted: 29 March 2017 10:32 AM |
# 7
|
|
|
Yes, works.
Thank you very much.
|
|
|