[TYPO3-calendar] Wrap the enddate only if the month is different from the start date

Mario Matzulla mario at matzullas.de
Fri Oct 16 20:40:42 CEST 2015


Hi Peter,

Am 16.10.15 um 16:18 schrieb Peter Gallagher:
> On 2015-10-15 3:07 PM, Mario Matzulla wrote:
>> Hi Peter,
>> Am 15.10.15 um 18:58 schrieb Peter Gallagher:
>>> Hi,
>>> I'm trying to remove the Month only from the enddate of an event when its in the same month as the start date.
>>>
>>> I get: Jan 1 - Jan 3
>>>
>>> I want: Jan 1 - 3
>>>
>>> Here's what I've tried:
>>> plugin.tx_cal_controller.view.list.event {
>>> enddate{
>>>    wrap = <span class="hidemonth">|</span>
>>>    wrap.if{
>>>      value.field = end
>>>      value.strtotime = 1
>>>      value.strftime = %e
>>>      equals.field = start
>>>      equals.strtotime = 1
>>>      equals.strftime = %e
>>>    }
>>> }
>>> }
>>>
>>> Since it seems that dateFormat isn't parsed by stdWrap so I am trying to wrap all the event enddate's with the same month as the start date.
>>> This isn't working.
>>>
>>> Any help or hints would be appreciated.
>>
>> I just had this question yesterday too:
>>
>> view.list.event.enddate >
>> view.list.event.enddate = COA
>> view.list.event.enddate.1 = TEXT
>> view.list.event.enddate.1.noTrimWrap = | - ||
>> view.list.event.enddate.1.field = end
>> view.list.event.enddate.1.strftime = %d
>> view.list.event.enddate.1.if.value.field = start
>> view.list.event.enddate.1.if.value.strftime = %b
>> view.list.event.enddate.1.if.equals.field = end
>> view.list.event.enddate.1.if.equals.strftime = %b
>>
>> view.list.event.enddate.2 = TEXT
>> view.list.event.enddate.2.noTrimWrap = | - ||
>> view.list.event.enddate.2.field = end
>> view.list.event.enddate.2.strftime = %b %d
>> view.list.event.enddate.2.if.value.field = start
>> view.list.event.enddate.2.if.value.strftime = %b
>> view.list.event.enddate.2.if.equals.field = end
>> view.list.event.enddate.2.if.equals.strftime = %b
>> view.list.event.enddate.2.if.negate = 1
>>
>> BUT there is/was a problem with recurring events:
>> https://forge.typo3.org/projects/extension-cal/repository/revisions/a093814c0b8b5bd6c757e62674985bfaab2958af
>>
>> Regards,
>> Mario
>>
> Mario,
> I just noticed that the end dates are wrong.
> 
> So before manipulating the enddate: Jan 5 - Jan 7
> After manipulating the enddate: Jan 5 - Oct 31 or Jan 21 - 7
> 
> Any idea why this would be happening?

is it a recurring event instance? Please have a look at my link.

Regards,
Mario

> 
> thanks
> Peter



More information about the TYPO3-project-calendar mailing list