Contribute to JEvents

Conditional printing of date

We are looking for developers, forum moderators and translators for this project.

If you would like to help out then please add a message in this forum.

Postby arrie62d » Fri Oct 07, 2011 5:00 pm

Hi,
First of all, thanks for a great component! I use it on our church's website to interface with a google calendar.
I added a feature to jevents (2.0) to conditionally print a date. Conditionally means non-repetitive, e.g. Instead of writing:

Tuesday October 1 10:00 Dentist's appointment
Tuesday October 1 11:00 Doctor's appointment
Tuesday October 1 12:00 Therapist's appointment
Wednesday October 2 10:00 Logopedist's appointment

It will output:
Tuesday October 1 10:00 Dentist's appointment
11:00 Doctor's appointment
12:00 Therapist's appointment
Wednesday October 2 10:00 Logopedist's appointment
(Note that each date is only output once)

I didn't know of such a feature, so I wrote it myself. It is specified in the format by adding a special key ('@#'). The key is deleted from the output, and the string with the key in it is only output once for each date. So to get the above, one would format it like:
event{'@# date_format') event ('time format') ...

Let me know what you think of this solution.
arrie62d
 
Posts: 3
Joined: Fri Oct 07, 2011 4:48 pm

Return to Contribute to JEvents

cron
  • Who is online
  • View new posts
  • View unanswered posts
  • In total there are 0 users online :: 0 registered and 0 hidden (based on users active over the past 5 minutes)
  • Most users ever online was 94 on Tue Sep 01, 2009 12:33 am
  • Users browsing this forum: No registered users