function uc_date_format in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_store/uc_store.module \uc_date_format()
- 7.3 uc_store/uc_store.module \uc_date_format()
Formats a date value for display.
3 calls to uc_date_format()
- uc_payment_method_cod in payment/
uc_payment_pack/ uc_payment_pack.module - Payment method callback for the "Cash on Delivery" payment method.
- uc_payment_pack_receive_check_form_submit in payment/
uc_payment_pack/ uc_payment_pack.admin.inc - Submit handler for uc_payment_pack_receive_check_form().
- uc_store_format_settings_form in uc_store/
uc_store.admin.inc - Displays the form for format settings.
File
- uc_store/
uc_store.module, line 1047 - Contains global Ubercart functions and store administration functionality.
Code
function uc_date_format($month, $day, $year, $class = 'default') {
$time = strtotime($month . '/' . $day . '/' . $year);
$pattern = variable_get('uc_date_format_' . $class, 'm/d/Y');
if (strlen($pattern) < 3) {
$pattern = 'm/d/Y';
}
return format_date($time, 'custom', $pattern);
}