Jump to content

Date format in listings and reviews

Recommended Posts

Hello there,


I want the date format like this: "25. Januar 2015".

I belive this is to be done somewhere here (detail_tabs.thtml), but can't fix it:

<?php if($this->Config->list_show_date):?>
<?php echo $Time->nice($listing['Listing']['created']);?>  
<?php endif;?>

The acutal format is "25 Januar 2015" (without the '.').


I can't find the right solution for what I want to do, could anyone please help me? Thanks in advance.

Share this post

Link to post

Try changing this line:

<?php echo $Time->nice($listing['Listing']['created']);?>  

to this:

<?php echo $Time->nice($listing['Listing']['created'], '%d. %B %Y');?>  

Share this post

Link to post

Unless you modify yourself the TimeHelper class inside the S2Framework you'll need to modify every theme file that uses this Time->nice method. 




You may be able to add this file to overrides in /jreviews_overrides/views/helpers/time.php and make your change there, but I am not really sure if that will work because I have not tested it. You would need to change the default format in the function parameter from null to ''%d. %B %Y''

Share this post

Link to post

The post marked as best answer shows you how you can change the date format shown on the site. You are asking about the date in the form input, and that cannot be changed.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Please refer to our Privacy Policy.