</protect>
</define-tag>
+<define-tag build_timeframe>
+<protect>
+<?
+ function build_timeframe ($start, $end)
+ {
+ # Bug: This can only handle fragments that don't pass day borders
+ $foo = explode (" ", $start);
+ $bar = explode (" ", $end);
+
+ $foo = explode (":", $foo[1]);
+ $bar = explode (":", $bar[1]);
+
+ if ($foo[1] == 0) {
+ if ($bar[1] == 0) {
+ return sprintf ("%d-%d", $foo[0], $bar[0]);
+ } else {
+ return sprintf ("%d-%d:%02d", $foo[0], $bar[0], $bar[1]);
+ }
+ } else {
+ if ($bar[1] == 0) {
+ return sprintf ("%d:%02d-%d", $foo[0], $foo[1], $bar[0]);
+ } else {
+ return sprintf ("%d:%02d-%d:%02d", $foo[0], $foo[1], $bar[0], $bar[1]);
+ }
+ }
+
+ }
+?>
+</protect>
+</define-tag>
+
# Local variables:
# mode: text
# mode: auto-fill