Title: [Plugin: Countdown Timer] [patch] On-hover date localization
Last modified: August 20, 2016

---

# [Plugin: Countdown Timer] [patch] On-hover date localization

 *  Resolved [pwesolek](https://wordpress.org/support/users/pwesolek/)
 * (@pwesolek)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-countdown-timer-patch-on-hover-date-localization/)
 * Hi,
 * We’re using Countdown Timer in non-English installation and the default formatting
   of on-hover date, which is non-localized with `gmdate()`, was unsatisfactory.
 * Hence a little change in the patch included against 2.4.3.
 * Firstly, it makes use of `date_i18n()` WordPress function instead of `gmdate()`.
   This change is backword-compatible, the date format used is the same.
 * Secondly, if the format date field in Countdown Timer settings is left blank,
   the default WordPress format, set on Settings page, is used as “[date], [format]”.
 * Please consider merging this patch — probably with fixes to settings instruction
   to make the behavior clear.
 * [http://wordpress.org/extend/plugins/countdown-timer/](http://wordpress.org/extend/plugins/countdown-timer/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [pwesolek](https://wordpress.org/support/users/pwesolek/)
 * (@pwesolek)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-countdown-timer-patch-on-hover-date-localization/#post-2698990)
 * The patch:
 *     ```
       --- ./fergcorp_countdownTimer.php.orig	2012-03-11 23:08:57.000000000 +0100
       +++ ./fergcorp_countdownTimer.php	2012-04-20 10:11:24.860685509 +0200
       @@ -402,7 +402,10 @@
        			$content = "<li class = 'fergcorp_countdownTimer_event_li'>";
        		$nonceTracker = "x".md5(rand()); //XHTML prevents IDs from starting with a number, so append a 'x' on the front just to make sure it dosn't start with numeric
        		$eventTitle = "<span class = 'fergcorp_countdownTimer_event_title'>".($link==""?$eventText:"<a href="$link">".$eventText."</a>").'</span>'.get_option('fergcorp_countdownTimer_titleSuffix')."\n";
       -		$timePrefix = "<abbr title = \"".gmdate($timeFormat, $time + (get_option('gmt_offset') * 3600))."\" id = '$nonceTracker' class = 'fergcorp_countdownTimer_event_time'>";
       +		if ($timeFormat == "") {
       +			$timeFormat = get_option('date_format') . ", " . get_option('time_format');
       +		}
       +		$timePrefix = "<abbr title = \"".date_i18n($timeFormat, $time + (get_option('gmt_offset') * 3600))."\" id = '$nonceTracker' class = 'fergcorp_countdownTimer_event_time'>";
   
        		if(($time_left < 0)&&($timeSince==1)&&((($time_left + $timeSinceTime) > 0)||($timeSinceTime == 0))){ //If the event has already passed and we still want to display the event
        			$fergcorp_countdownTimer_noEventsPresent = FALSE; //Set to FALSE so we know there's an event to display
       ```
   
 *  Plugin Author [fergbrain](https://wordpress.org/support/users/fergbrain/)
 * (@fergbrain)
 * [14 years ago](https://wordpress.org/support/topic/plugin-countdown-timer-patch-on-hover-date-localization/#post-2699181)
 * Implemented! [https://github.com/fergbrain/countdown-timer/commit/5d884698edb0bd2f8ee933c512fb0a44171db879](https://github.com/fergbrain/countdown-timer/commit/5d884698edb0bd2f8ee933c512fb0a44171db879)
 *  Thread Starter [pwesolek](https://wordpress.org/support/users/pwesolek/)
 * (@pwesolek)
 * [14 years ago](https://wordpress.org/support/topic/plugin-countdown-timer-patch-on-hover-date-localization/#post-2699182)
 * Cool, thanks. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Countdown Timer] [patch] On-hover date localization’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/countdown-timer_384620.svg)
 * [Countdown Timer](https://wordpress.org/plugins/countdown-timer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/countdown-timer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/countdown-timer/)
 * [Active Topics](https://wordpress.org/support/plugin/countdown-timer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/countdown-timer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/countdown-timer/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [pwesolek](https://wordpress.org/support/users/pwesolek/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-countdown-timer-patch-on-hover-date-localization/#post-2699182)
 * Status: resolved