Download & Extend

user format_date() for expiration messages

Project:UC Wish List
Version:6.x-1.1
Component:Code
Category:task
Priority:minor
Assigned:Unassigned
Status:active

Issue Summary

uc_wishlist_pages.inc, at line 73, is:

<?php
// Add expiration information to the display.
 
if ($wishlist->expiration < time()) {
   
$output .= '<p>'. t('This wish list may be no longer valid. It was for an event on @date.', array('@date' => date('F j, Y', $wishlist->expiration))) .'</p>';
  }
  elseif (
$wishlist->expiration > 0) {
   
$output .= '<p>'. t('This wish list is valid until @date.', array('@date' => date('F j, Y', $wishlist->expiration))) .'</p>';
  }
?>

Now the date is only in english, use something like:
<?php
// Add expiration information to the display.
 
if ($wishlist->expiration < time()) {
   
$output .= '<p>'. t('This wish list may be no longer valid. It was for an event on @date.', array('@date' => format_date($wishlist->expiration, 'custom', 'l j F Y'))) .'</p>';
  }
  elseif (
$wishlist->expiration > 0) {
   
$output .= '<p>'. t('This wish list is valid until @date.', array('@date' => format_date($wishlist->expiration, 'custom', 'l j F Y'))) .'</p>';
  }
?>