function merci_format_time in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6
Same name and namespace in other branches
- 6.2 includes/api.inc \merci_format_time()
- 7.2 includes/api.inc \merci_format_time()
Formats a time value into the site's preferred format.
Parameters
object $hours_minutes: A string of the form 'H:MM' or 'HH:MM'
Return value
A string in 12- or 24-hour format with no leading zero.
1 call to merci_format_time()
- merci_node_validate in ./
merci.module - Implementation of hook_validate().
File
- ./
merci.module, line 3211 - MERCI - Managed Equipment Reservation Checkout and Inventory
Code
function merci_format_time($hours_minutes) {
$return = date(merci_time_format(), strtotime($hours_minutes));
if ($return[0] == '0') {
return substr($return, 1);
}
return $return;
}