Can I generate "today" or "tomorrow" date in URL?

  • Stephan Hodges
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
4 years 2 months ago #141072 by Stephan Hodges
We have events that repeat every week, but from a different component (JEvent) because they have a way to put them on our front page ( hymcillinois.com/ ) right side, showing events from "today" and "tomorrow".

We would like to have a link that automatically fills the correct date depending on if it's today or tomorrow. JEvent does this with a special parameter "$(today)$tomorrow)", similar to how php formats strings. Their documentation on this is :  www.jevents.net/frequently-asked-questio...ustom-format-strings

Can we do this in Event Booking?  I.E. get the url to fill in either today's date or tomorrow's date?

So, we have this code in JEvent which generates a link to the Event Booking calendar for a specific date.
  url=index.php?option=com_eventbooking&view=calendar&layout=daily&day=${today}${tomorrow}&id=47&Itemid=2555]Go Register[/url

Embedded code here (view source to see it):
Code:
[color=#000000]5:00 - 6:15 pm[/color] [color=#000000][b]Zoom Only: Level 1&2 [url=index.php?option=com_eventbooking&view=calendar&layout=daily&day=${today}${tomorrow}&id=47&Itemid=2555]Go Register[/url][/b][/color]

The "Go Register" link (above) generates this:
hymcillinois.com/programs/hatha-calendar...y=${today}${tomorrow }

If the user clicks on today (Jan 25th) we want 
hymcillinois.com/programs/all-events-cal...daily&day=2021-01-25

But if they click on tomorrow (today is Jan 25th) we want
hymcillinois.com/programs/all-events-cal...daily&day=2021-01-26

Here's what the front page looks like (today, Jan 25th)
 

 

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #141076 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Can I generate "today" or "tomorrow" date in URL?
Hello Stephan

Unfortunately, this is not supported in Events Booking

Tuan

Please Log in or Create an account to join the conversation.

  • Stephan Hodges
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
4 years 2 months ago #141078 by Stephan Hodges
Replied by Stephan Hodges on topic Can I generate "today" or "tomorrow" date in URL?
Are there any places where code could be added or someplace where a formatting option could be called to do this? Any existing settings?

Thanks for your time.

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc