Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Template::Plugin::ByDate 0.03

    Download button

    No screenshots available
    Downloads: 333  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Darin McBride | More programs
    Perl Artistic License / FREE
    April 14th, 2007, 05:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Template::Plugin::ByDate description

    Template::Plugin::ByDate is a Perl module that keeps/removes included text based on whether the current date is within range.

    Template::Plugin::ByDate is a Perl module that keeps/removes included text based on whether the current date is within range.

    SYNOPSIS

    [% USE ByDate %]

    [% FILTER ByDate
    starting = '2006-05-02'
    until = '2006-08-22' %]
    This text only shows up from May 2, 2006 through August 22, 2006.
    [% END %]

    FUNCTIONS

    init

    filter

    We accept one optional argument, the word "not". If specified, it will reverse the meaning of the filter: rather than keeping the text if the current date is between starting and until, ignore it. e.g.,

    [% FILTER ByDate
    starting = '2006-05-02'
    until = '2006-08-22' %]
    This only shows up inside the date range
    [% END %]
    while
    [% FILTER ByDate
    'not' starting = '2006-05-02'
    until = '2006-08-22' %]
    This only shows up outside the date range
    [% END %]

    The starting and until dates are actually parsed by Date::Parse. If you do not specify a time, the starting time is 00:00:00, while the until time is 23:59:59. This is done by checking the until stamp for a colon - if there is no colon, we add " 23:59:59" to the string before passing it into Date::Parse. If that doesn't work for you, please let me know what string you're using.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    remove text | keep text | Perl module | Template::Plugin::By | remove | text

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM