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.
If you would like to help out then please add a message in this forum.
Conditional printing of date
by 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.
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: 1
- Joined: Fri Oct 07, 2011 4:48 pm
1 post
• Page 1 of 1
Return to Contribute to JEvents
Who is online
Users browsing this forum: No registered users

