HowTo

... configure date & time formats

 

Date & Time

There is one place, which controls most of the static values in cal:

 

Constant editor
Constant editor

The constant editor will help you setting different values:

But what it basically does is, to insert a new property into the typoscript constant field:

plugin.tx_cal_controller.view.timeFormat = %H:%M

 

The different format options are:

%a  =  abbreviated weekday name (Sun, Mon, Tue) 
%A  =  full weekday name (Sunday, Monday, Tuesday) 
%b  =  abbreviated month name (Jan, Feb, Mar) 
%B  =  full month name (January, February, March) 
%C  =  century number (the year divided by 100 and truncated to an integer, range 00 to 99) 
%d  =  day of month (range 00 to 31) 
%D  =  same as "%m/%d/%y" 
%e  =  day of month, single digit (range 0 to 31) 
%E  =  number of days since unspecified epoch (integer, Date_Calc::dateToDays()) 
%H  =  hour as decimal number (00 to 23) 
%I  =  hour as decimal number on 12-hour clock (01 to 12) 
%j  =  day of year (range 001 to 366) 
%m  =  month as decimal number (range 01 to 12) 
%M  =  minute as a decimal number (00 to 59) 
%n  =  newline character (\n) 
%O  =  dst-corrected timezone offset expressed as "+/-HH:MM" 
%o  =  raw timezone offset expressed as "+/-HH:MM" 
%p  =  either 'am' or 'pm' depending on the time 
%P  =  either 'AM' or 'PM' depending on the time 
%r  =  time in am/pm notation, same as "%I:%M:%S %p" 
%R  =  time in 24-hour notation, same as "%H:%M" 
%s  =  seconds including the decimal representation smaller than one second 
%S  =  seconds as a decimal number (00 to 59) 
%t  =  tab character (\t) 
%T  =  current time, same as "%H:%M:%S" 
%w  =  weekday as decimal (0 = Sunday) 
%U  =  week number of current year, first sunday as first week 
%y  =  year as decimal (range 00 to 99) 
%Y  =  year as decimal including century (range 0000 to 9999) 
%%  =  literal '%'

The defined constant itself does nothing! It has to be referenced inside the typoscript setup part. That's why every typoscript setup time format looks similar to this one:

plugin.tx_cal_controller.view.event.event.timeFormat = {$plugin.tx_cal_controller.view.timeFormat}

To sum it up: define your date and time format using the constant editor. If you need exceptions to the rule, define them in the typoscript setup, through overriding an existing format:

plugin.tx_cal_controller.view.event.event.timeFormat = %R