-
jitr
- OFFLINE
-
ARTIO Support
- Posts: 1432
-
-
|
Hello, I thought that it already works in this way ...
Open administrator/com_booking/helpers/html.php
There is function looks like:
/** * Display reservation interval. * * @param TableReservation $reservation */ function interval(&$reservation, $offset = null) { if (AHtml::date($reservation->from, ADATE_FORMAT_MYSQL_TIME, $offset) == '00:00:00' && AHtml::date($t = $reservation->to, ADATE_FORMAT_MYSQL_TIME, $offset) == '23:59:00') { // full day reservation if (AHtml::date($reservation->from, ADATE_FORMAT_NORMAL, $offset) == AHtml::date($reservation->to, ADATE_FORMAT_NORMAL, $offset)) // reservation begins and ends in the same day return JText::sprintf('Interval date', AHtml::date($reservation->from, ADATE_FORMAT_NORMAL, $offset)); else return JText::sprintf('Interval from to', AHtml::date($reservation->from, ADATE_FORMAT_NORMAL, $offset), AHtml::date($reservation->to, ADATE_FORMAT_NORMAL, $offset)); } else // partly day reservation (hourly or night booking) return JText::sprintf('Interval from to time up down', AHtml::date($reservation->from, ADATE_FORMAT_NORMAL, $offset), AHtml::date($reservation->from, ATIME_FORMAT_SHORT, $offset), AHtml::date($reservation->to, ADATE_FORMAT_NORMAL, $offset), AHtml::date($reservation->to, ATIME_FORMAT_SHORT, $offset)); }
Replace it with this code:
/** * Display reservation interval. * * @param TableReservation $reservation */ function interval(&$reservation, $offset = null) { if (AHtml::date($reservation->from, ADATE_FORMAT_MYSQL_TIME, $offset) == '00:00:00' && AHtml::date($t = $reservation->to, ADATE_FORMAT_MYSQL_TIME, $offset) == '23:59:00') { // full day reservation if (AHtml::date($reservation->from, ADATE_FORMAT_NORMAL, $offset) == AHtml::date($reservation->to, ADATE_FORMAT_NORMAL, $offset)) // reservation begins and ends in the same day return JText::sprintf('Interval date', AHtml::date($reservation->from, ADATE_FORMAT_NORMAL, $offset)); else return JText::sprintf('Interval from to', AHtml::date($reservation->from, ADATE_FORMAT_NORMAL, $offset), AHtml::date($reservation->to, ADATE_FORMAT_NORMAL, $offset)); } else // partly day reservation (hourly or night booking) if (AHtml::date($reservation->from, ADATE_FORMAT_NORMAL, $offset) == AHtml::date($reservation->to, ADATE_FORMAT_NORMAL, $offset)) // day begin and day end are the same return JText::sprintf('Interval day time up down', AHtml::date($reservation->from, ADATE_FORMAT_NORMAL, $offset), AHtml::date($reservation->from, ATIME_FORMAT_SHORT, $offset), AHtml::date($reservation->to, ATIME_FORMAT_SHORT, $offset)); // day begin and day end are different return JText::sprintf('Interval from to time up down', AHtml::date($reservation->from, ADATE_FORMAT_NORMAL, $offset), AHtml::date($reservation->from, ATIME_FORMAT_SHORT, $offset), AHtml::date($reservation->to, ADATE_FORMAT_NORMAL, $offset), AHtml::date($reservation->to, ATIME_FORMAT_SHORT, $offset)); }
Then add into administrator/language/en-GB/en-GB.com_booking.common.ini
INTERVAL DAY TIME UP DOWN="%s %s - %s"
|