Events Made Easy › Forums › How do I … › How to get the date right depending on the period of the event ?
Tagged: Date
- This topic has 11 replies, 4 voices, and was last updated 13 years, 8 months ago by Franky.
-
AuthorPosts
-
Mon 24 Jan 2011 at 14:07 #42462AnonymousInactive
Franky, I have a question for you !! π
I did put the date on my event page:
<p class=”confdate”>#j #M #Y – #@j #@M #@Y</p>
If I understood well these are beginning and ending dates. In my situation there are events that last one day and some several days. For the several days, it is ok but for the one day events, the plugin displays 2 times the date, one for the beginning and the same for the ending date.
How can I have only one date on 1 day events and 2 dates on several days events ?
Thanks !! π
Mon 24 Jan 2011 at 15:36 #46444FrankyKeymasterThe next version has conditional tags support, so you can compare the start and end dates and only display the part that you want. See http://www.e-dynamics.be/wordpress/?cat=24.
Tue 25 Jan 2011 at 22:38 #46445AnonymousInactiveI too, would like to know this. For one day events, I keep getting a hyphen in front of the day. Here is my code:
- #@_{j M Y} #_{- j M Y} | #_12HSTARTTIME-#_12HENDTIME | #_TOWN
#_LINKEDNAME#_EXCERPT<p>
In my event input screen, do I just put the event date for start, or for just end date?
Tue 25 Jan 2011 at 23:01 #46446Thu 27 Jan 2011 at 09:19 #46447AnonymousInactiveHi,
I have version 3.1.6 installed and it does not work. Here is the code I entered:
- <p class=”confcat”>#_CATEGORIES</p>
<p class=”conftown”>#_TOWN</p>
<p class=”confdate”>
[events_if tag="#ESC_{j M Y}" value="#ESC_@{j M Y}"] [/events_if]
#j #M #Y – #@j #@M #@Y
</p>
<p class=”confhour”>de #H:#i Γ #@H:#@i</p>
<p class=”confname”>#_NAME</p>
<p class=”confdetails”>#_NOTES</p>
It just displays the code on the web page. It means, I think, that it does not understand the shortcode. Maybe I included it at the wrong place ?
Thanks for your help
Thu 27 Jan 2011 at 09:36 #46448FrankyKeymasterPlease do tell me why you think it would work? If you don’t upgrade, don’t use functionality of newer releases. And if you do upgrade: your usage of [events_if] is even wrong, see http://www.e-dynamics.be/wordpress/?cat=24
Fri 28 Jan 2011 at 14:25 #46449AnonymousInactiveWell, I’m using ver 3.3 with this code in my widget, default event list, & default single event format—now I get my single date, but it doesn’t show my range dates. Why would that be?
[events_if tag=β#ESCj #ESCM #ESCYβ value=β#ESC@j #ESC@M #ESC@Yβ] #j #M #Y [/events_if]
Fri 28 Jan 2011 at 14:50 #46450AnonymousInactiveNevermind, I figured it out. Hope this is helpful to someone else.
I added the events_if conditional tag *in addition* to my regular formatting. So I end up with this:
#_{j M Y} #@_{- j M Y}[events_if tag=β#ESC_{j M Y}β value=β#ESC_@{j M Y}β] #{j M Y} [/events_if]
This gives me my range dates plus shows me only single dates for one day events.
Thank you for a very nice plugin. Will donate to you.
Mon 31 Jan 2011 at 23:11 #46451AnonymousInactiveVery helpful! Thank you for posting the code!
Tue 12 Apr 2011 at 17:18 #46452AnonymousInactiveUnfortunately, It does not work for me Ally. If I use your code, I get “starting date – ending date starting date”, which is logical if we look at your code. What I would like is something like that:
If the starting date and the ending date are the same, then display the starting date. If not display both dates.
No idea Franky ?
Thanks everyone for you help,
Tue 12 Apr 2011 at 17:28 #46453AnonymousInactiveActually, I just solved the problem using two conditional tags:
[events_if tag="#ESC_{j M Y}" notvalue="#ESC@_{j M Y}"] #j #M #Y #@_{- j M Y} [/events_if]
[events_if tag="#ESC_{j M Y}" value="#ESC@_{j M Y}"] #j #M #Y [/events_if]
Tue 12 Apr 2011 at 17:39 #46454FrankyKeymasterThese are already on the documentation pages as examples:
- #@_{j M Y} #_{- j M Y} | #_12HSTARTTIME-#_12HENDTIME | #_TOWN
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.