Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Amir Khan 1199 posts 2567 karma points
    Mar 02, 2010 @ 16:34
    Amir Khan
    0

    Getting current year

    Is there a good way to get the current year in xslt? To keep a copyright date updated for example?

     

    Thank you!

  • dandrayne 1138 posts 2262 karma points
    Mar 02, 2010 @ 16:43
    dandrayne
    4
    umbraco.library:FormatDateTime(umbraco.library:CurrentDate(), 'yyyy')

    should do it, or indeed

    Exslt.ExsltDatesAndTimes:year()

    Should also do it.

    Dan

  • Amir Khan 1199 posts 2567 karma points
    Mar 02, 2010 @ 17:20
    Amir Khan
    0

    Yup! That'll do it.

  • Douglas Robar 3570 posts 4671 karma points MVP ∞ admin c-trib
    Mar 02, 2010 @ 17:23
    Douglas Robar
    3

    Here are a couple other ways to do it, without needing a macro!

    http://blog.percipientstudios.com/2010/1/2/the-never-expiring-copyright-date.aspx

    cheers,
    doug.

  • Amir Khan 1199 posts 2567 karma points
    Mar 02, 2010 @ 17:56
    Amir Khan
    0

    Doug, very interesting, thank you!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies