Help > Forum > Topics & Posts > Viewing the exact date and time of a post

Viewing the exact date and time of a post

Dates in your forum show a convenient "X hours ago" or "X minutes ago" for dates that occurred less than 24 hours ago. Also, any dates that occurred in the current year don't mention the year. User-friendliness studies have shown that formatting recent dates this way greatly increases readability and ease-of-use. This is the same style that Facebook and other Internet giants are using based on the feedback of billions of users.

However, there may be times when you need to know the exact date and time of a post. Therefore, you can put your mouse over the date to see the exact date in its full and normal form.

Dates that occurred more than 30 days ago are still shown using the normal date formatting.

While we don't recommend showing the full date and time due to the reasons mentioned above, we understand that some use cases may require it. You can follow these instructions if you'd like to always show the full date and time on the page:

  1. Log in to your Website Toolbox account.
  2. Click the Integrate link.
  3. Click the HTML link.
  4. Insert the following HTML code into the Forum Head Tag HTML Code text box:

    <script>
    window.addEventListener("load", function(event) {
      jQ('time').each(function () {
        if (jQ(this).html().match(/,|\/|ago| [0-9]/)) {
          jQ(this).html(jQ(this).attr('title'));
        }
      })
    });
    </script>
    
  5. Save your Settings.

Use this code if you'd only like to show the full date on the page, excluding the time:

<script>
window.addEventListener("load", function(event) {
  jQ('time').each(function () {
    if (jQ(this).html().match(/,|\/|ago| [0-9]/)) {
      jQ(this).html((jQ(this).attr('title').match(/(.+),/))[1]);
    }
  })
});
</script>


If you still need help, please contact us.