Results 1 to 7 of 7

Thread: How to make a long date short

  1. #1
    New user
    Join Date
    12-06-11.
    Posts
    13

    Default How to make a long date short

    Hello there forum

    I'm having a bit of difficulty formatting the date in my templates.

    What I'm getting now is:
    16pm29Europe/Copenhagen(16-02-2012) (19:00 - 21:00)
    Where I want to have this:
    16-02-2012 (19:00 - 12:00)
    So in all, I want to get rid of the "16pm29Europe/Copenhagen" in front of the date, but I can't seem to figure out how :/

  2. #2
    User
    Join Date
    06-19-09.
    Posts
    328

    Default Re: How to make a long date short

    Quote Originally Posted by KristianK
    Hello there forum
    I'm having a bit of difficulty formatting the date in my templates.
    So in all, I want to get rid of the "16pm29Europe/Copenhagen" in front of the date, but I can't seem to figure out how :/
    which template are you talking about?

    however check the "date format" both in "settings" and in the root page configuration
    Consulenza Contao CMS https://www.intco.it

  3. #3
    New user
    Join Date
    12-06-11.
    Posts
    13

    Default Re: How to make a long date short

    Quote Originally Posted by ga.n
    which template are you talking about?
    sorry I didn't mention that, but I thought it was the same in all the templates, because they all format as the same. But the template I'm specifically talking about, is the event_default.tpl

    I am using these settings:


    the root page configuration (am I correct if that is: "root/system/config/config.php"?) is set to the exact same.

  4. #4
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: How to make a long date short

    (am I correct if that is: "root/system/config/config.php"?)
    Check root/system/config/dcaconfig.php and root/system/config/localconfig.php

  5. #5
    New user
    Join Date
    12-06-11.
    Posts
    13

    Default Re: How to make a long date short

    the dcaconfig.php only has commented lines in it and both of the files (dcaconfig.php and localconfig.php) has no lines, whatsoever, about dates and timesettings :/

  6. #6
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: How to make a long date short

    I'm having a bit of difficulty formatting the date in my templates.
    the template I'm specifically talking about, is the event_default.tpl
    Have you modified this template already ? (that is: is this template present under Templates?)
    Or are you using some extension that affects Events output?
    Perhaps post the code of the template event_default.tpl here.

  7. #7
    New user
    Join Date
    12-06-11.
    Posts
    13

    Default Re: How to make a long date short

    I made a mistake earlier: The template I'm talking about is the event_full.tpl, which I have not modified.
    Another template that does the same is my eventlist, which I've modified and you can see the code of the template below:

    Code:
    <?php if ($this->header): ?>
    <div class="event layout_list<?php echo $this->classList; ?>">
    <a href="<?php echo $this->href; ?>" title="<?php echo $this->title; ?> (<?php if ($this->day): echo $this->day; ?>, <?php endif; echo $this->date; if ($this->time): ?>, <?php echo $this->time; endif; ?>)" <?php echo $this->target; ?>>
    <?php echo $this->link; ?> (<?php echo $this->firstDateShort; if ($this->firstDay): ?> <?php if ($this->time || $this->span): echo $this->time . $this->span; endif;?>)</a><?php endif; ?>  
    </div>
    
    <?php endif; ?>
    "firstDateShort" is my attempt to make the date better, but nothing is working :/

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •