You are here

function uc_date_format in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_store/uc_store.module \uc_date_format()
  2. 7.3 uc_store/uc_store.module \uc_date_format()

Format a date value for display.

2 calls to uc_date_format()
uc_payment_method_cod in payment/uc_payment_pack/uc_payment_pack.module
Handle the Cash on Delivery payment method.
uc_store_store_settings_overview in uc_store/uc_store.module
Display the store settings overview page.

File

uc_store/uc_store.module, line 1970
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);
}