Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By cpaxlvacy on
Hello there, i just installed the jquery countdown timer but i have an issue, i need the timer to display the remainder time showind Days instead of Weeks left. Any help?
https://www.drupal.org/project/jquery_countdown_timer
Thanks!
Comments
patch the module
Patch the date formatting in the module, using reference to the PHP date/time functions as a guide.
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...
Patching the module
Thanks for replying. I don't have any idea how to patch in drupal, could you tell me the steps please? :)
easily editable
Just edit the:
jquery_countdown_timer.module
file in {site}/sites/all/modules/jquery_countdown_timer, and change the date display format, which is at about line 50 in the file, payign close attention to the PHP date/time function format codes (see link below).
http://php.net/manual/en/function.date.php
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...
Date format
I'm really bad at programming, i'm really sorry :(
This is the function:
$form['jquery_countdown_timer_date'] = array(
'#type' => 'date_select',
'#title' => t('Timer date'),
'#default_value' => variable_get('jquery_countdown_timer_date', date('Y-m-d G:i:s')),
'#date_format' => 'Y-m-d H:i',
);
break;
Do you know what exactly needs to be changed? if you could help me that would would be wonderful my friend
Read the PHP date/time
Read the PHP date/time formatting page and then change the codes:
Y-m-d G:i:s
'Y-m-d H:i
To match the format you want.
There may be more to do. I have not actually tried this myself. I just glanced at the code, to point you to it. You are going to have to learn enough rudimentary PHP and so forth to figure out the details.
Experiment with it and see what happens ...
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...
Thanks, i'm gonna try to do
Thanks, i'm gonna try to do this!!