Skip to main content
December 23, 2010
Question

How can I make RH display today's date (year only for Copyright in footer)?

  • December 23, 2010
  • 1 reply
  • 625 views

I need to put a client's name and copyright year in the footer such that it will update according to to

day's date. Hence, when we reach 1st Jan 2011, the copyright changes to (c) 2011.

How do I insert it? And is this where we use a Snippet?

(RH8).

Philip

    This topic has been closed for replies.

    1 reply

    December 23, 2010

    Ah - found it -

    <p>©
    <script type="text/javascript">
    var d = new Date();
    document.write(d.getFullYear());
    </script></p>

    On another post. Change PC date to next year and it updates the year of the date viewed.

    TTFN

    Captiv8r
    Legend
    December 23, 2010

    Hi Philip

    I note that you seem to have found your solution and that's cool.

    For the faint of heart when it comes to using JavaScript, RoboHelp actually offers a way to accomplish it right from inside the UI.

    For starters, I edited the footer area of a Master Page. In that footer I clicked Insert > Fields and Variables... This presented the Fields and Variables dialog.

    From there I clicked New and replaced the default in the Current format field with yyyy.

    Cheers... Rick

    Helpful and Handy Links

    RoboHelp Wish Form/Bug Reporting Form

    Begin learning RoboHelp HTML 7 or 8 moments from now - $24.95!

    Adobe Certified RoboHelp HTML Training

    SorcererStone Blog

    RoboHelp eBooks

    December 23, 2010

    Hello Rick,

    I tried that ... but when I moved the PC date into next year and refreshed the browser, it didn't change the date. It seems to insert the build date.

    That's why I used the script - works every time.

    Happy Christmas!

    Philip