Can I dynamically display the name of current month?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cbiweb
    Senior Member
    • Apr 2004
    • 2658
    • 4.1.x

    Can I dynamically display the name of current month?

    I want to display the name of the current month in a phrase. Tried inserting
    PHP Code:
    <? php echo date('F'); ?>
    and
    Code:
    {F}
    into a phrase, but of course those didn't work.

    Is there a way to do this?
    ~ Life isn't always fair, but you can be. ~
  • Shadab
    Senior Member
    • Nov 2007
    • 143
    • 3.8.x

    #2
    You could create a plugin with: $currentMonth = date('F'); and use $currentMonth variable directly in a template.

    And if it really has to be placed in a Phrase,
    you can try using something like: (untested, though)

    In Template:
    HTML Code:
    <phrase 1="$currentMonth">$vbphrase[current_month_is_x]</phrase>
    In Phrase:
    Code:
    The current month is {1}.
    The joy of an early release lasts but a short time. The bitterness of an unusable system lasts for years.
    GeekPoint Forum | Articles & Reference

    Comment

    • Chimpie
      Senior Member
      • Nov 2007
      • 292
      • 3.8.x

      #3
      let us know if this works
      CHIMPIE | SKYWARN | EMTLIFE

      Comment

      • genxstan
        New Member
        • Nov 2009
        • 23
        • 4.1.x

        #4
        Sorry for digging up an old thread. Can anybody know how to do this?
        I don't understand what's said in this thread.

        Comment

        Related Topics

        Collapse

        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎