internal package
Foswiki::Plugins::CalendarPlugin::Core StaticMethod
_formatDate ($cal, $formatString, $date) → $value $cal
A reference to the Date::Calc calendar in use.
$formatString
twiki time date format, default $day $month $year - $hour:$min
$date
The date (Date::Calc days value) of the date to format. At some point we should handle times, too.
$formatString
supports:
$seconds | secs |
$minutes | mins |
$hours | hours |
$day | date |
$wday | weekday name |
$dow | day number (0 = Sunday) |
$week | week number |
$month | month name |
$mo | month number |
$year | 4-digit year |
$ye | 2-digit year |
$http | full HTTP header format date/time |
full email format date/time | |
$rcs | full RCS format date/time |
$epoch | seconds since 1st January 1970 |
Note that this description (and some of the code) is taken from the core function formatTime. Ideally, we would be able to use that function, but that function deals with time in seconds from the epoch and this plugin uses a different notion of time.
StaticMethod
_highlightMultiDay ($cal, $d, $description, $first, $last, $today, $seen, %options) → $value $cal
is the current calendar
$d
is the day (within the calendar/month) to highlight
$description
is the description of the event
$first
is the Date::Calc day value of the first day of the event
$last
is the Date::Calc day value of the last day of the event
$today
is the Date::Calc day value of the day being highlighted
$seen
is non-zero (true) if this event has been already been indicated in this calendar
%options
is a set of plugin options
The multidayformat option allows the description of each day of a multiday event to be displayed differently. This could be used to visually or textually annotate the description to indicate continuance from or to other days.
The option consists of a comma separated list of formats for each type of day in a multiday event:
first, middle, last, middle-unseen, last-unseen
Where:
Missing formats will be filled in as follows:
Missing formats are different from empty formats. For example,
multidayformat="$description (until $last($day $month)),,"
specifies an empty format for middle and last. The result of this is that only the first day will be shown. Note that since an unspecified middle-unseen is set from the (empty) middle format, an event that begins prior to the calendar being displayed but ending in the current calendar will not be displayed. In contrast, multidayformat="$description" will simply display the description for each day of the event; all days (within the scope of the calendar) will be displayed.The default format is to simply display the description of the event.