{
    "content": [
        {
            "type": "text",
            "text": "# Template::Plugin::Date (perldoc)\n\n## NAME\n\nTemplate::Plugin::Date - Plugin to generate formatted date strings\n\n## SYNOPSIS\n\n[% USE date %]\n# use current time and default format\n[% date.format %]\n# specify time as seconds since epoch\n# or as a 'h:m:s d-m-y' or 'y-m-d h:m:s' string\n[% date.format(960973980) %]\n[% date.format('4:20:36 21/12/2000') %]\n[% date.format('2000/12/21 4:20:36') %]\n# specify format\n[% date.format(mytime, '%H:%M:%S') %]\n# specify locale\n[% date.format(date.now, '%a %d %b %y', 'enGB') %]\n# named parameters\n[% date.format(mytime, format = '%H:%M:%S') %]\n[% date.format(locale = 'enGB') %]\n[% date.format(time   = date.now,\nformat = '%H:%M:%S',\nlocale = 'enGB) %]\n# specify default format to plugin\n[% USE date(format = '%H:%M:%S', locale = 'deDE') %]\n[% date.format %]\n...\n\n## DESCRIPTION\n\nThe \"Date\" plugin provides an easy way to generate formatted time and date strings by delegating\nto the \"POSIX\" \"strftime()\" routine.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **AUTHORS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Template::Plugin::Date",
        "section": "",
        "mode": "perldoc",
        "summary": "Template::Plugin::Date - Plugin to generate formatted date strings",
        "synopsis": "[% USE date %]\n# use current time and default format\n[% date.format %]\n# specify time as seconds since epoch\n# or as a 'h:m:s d-m-y' or 'y-m-d h:m:s' string\n[% date.format(960973980) %]\n[% date.format('4:20:36 21/12/2000') %]\n[% date.format('2000/12/21 4:20:36') %]\n# specify format\n[% date.format(mytime, '%H:%M:%S') %]\n# specify locale\n[% date.format(date.now, '%a %d %b %y', 'enGB') %]\n# named parameters\n[% date.format(mytime, format = '%H:%M:%S') %]\n[% date.format(locale = 'enGB') %]\n[% date.format(time   = date.now,\nformat = '%H:%M:%S',\nlocale = 'enGB) %]\n# specify default format to plugin\n[% USE date(format = '%H:%M:%S', locale = 'deDE') %]\n[% date.format %]\n...",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 30,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 80,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Template::Plugin::Date - Plugin to generate formatted date strings\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "[% USE date %]\n\n# use current time and default format\n[% date.format %]\n\n# specify time as seconds since epoch\n# or as a 'h:m:s d-m-y' or 'y-m-d h:m:s' string\n[% date.format(960973980) %]\n[% date.format('4:20:36 21/12/2000') %]\n[% date.format('2000/12/21 4:20:36') %]\n\n# specify format\n[% date.format(mytime, '%H:%M:%S') %]\n\n# specify locale\n[% date.format(date.now, '%a %d %b %y', 'enGB') %]\n\n# named parameters\n[% date.format(mytime, format = '%H:%M:%S') %]\n[% date.format(locale = 'enGB') %]\n[% date.format(time   = date.now,\nformat = '%H:%M:%S',\nlocale = 'enGB) %]\n\n# specify default format to plugin\n[% USE date(format = '%H:%M:%S', locale = 'deDE') %]\n\n[% date.format %]\n...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The \"Date\" plugin provides an easy way to generate formatted time and date strings by delegating\nto the \"POSIX\" \"strftime()\" routine.\n\nThe plugin can be loaded via the familiar USE directive.\n\n[% USE date %]\n\nThis creates a plugin object with the default name of '\"date\"'. An alternate name can be\nspecified as such:\n\n[% USE myname = date %]\n\nThe plugin provides the \"format()\" method which accepts a time value, a format string and a\nlocale name. All of these parameters are optional with the current system time, default format\n('\"%H:%M:%S %d-%b-%Y\"') and current locale being used respectively, if undefined. Default values\nfor the time, format and/or locale may be specified as named parameters in the \"USE\" directive.\n\n[% USE date(format = '%a %d-%b-%Y', locale = 'frFR') %]\n\nWhen called without any parameters, the \"format()\" method returns a string representing the\ncurrent system time, formatted by \"strftime()\" according to the default format and for the\ndefault locale (which may not be the current one, if locale is set in the \"USE\" directive).\n\n[% date.format %]\n\nThe plugin allows a time/date to be specified as seconds since the epoch, as is returned by\n\"time()\".\n\nFile last modified: [% date.format(filemodtime) %]\n\nThe time/date can also be specified as a string of the form \"h:m:s d/m/y\" or \"y/m/d h:m:s\". Any\nof the characters : / - or space may be used to delimit fields.\n\n[% USE day = date(format => '%A', locale => 'enGB') %]\n[% day.format('4:20:00 9-13-2000') %]\n\nOutput:\n\nTuesday\n\nA format string can also be passed to the \"format()\" method, and a locale specification may\nfollow that.\n\n[% date.format(filemod, '%d-%b-%Y') %]\n[% date.format(filemod, '%d-%b-%Y', 'enGB') %]\n\nA fourth parameter allows you to force output in GMT, in the case of seconds-since-the-epoch\ninput:\n\n[% date.format(filemod, '%d-%b-%Y', 'enGB', 1) %]\n\nNote that in this case, if the local time is not GMT, then also specifying '%Z' (time zone) in\nthe format parameter will lead to an extremely misleading result.\n\nAny or all of these parameters may be named. Positional parameters should always be in the order\n\"($time, $format, $locale)\".\n\n[% date.format(format => '%H:%M:%S') %]\n[% date.format(time => filemod, format => '%H:%M:%S') %]\n[% date.format(mytime, format => '%H:%M:%S') %]\n[% date.format(mytime, format => '%H:%M:%S', locale => 'frFR') %]\n[% date.format(mytime, format => '%H:%M:%S', gmt => 1) %]\n...etc...\n\nThe \"now()\" method returns the current system time in seconds since the epoch.\n\n[% date.format(date.now, '%A') %]\n\nThe \"calc()\" method can be used to create an interface to the \"Date::Calc\" module (if installed\non your system).\n\n[% calc = date.calc %]\n[% calc.MondayofWeek(22, 2001).join('/') %]\n\nThe \"manip()\" method can be used to create an interface to the \"Date::Manip\" module (if\ninstalled on your system).\n\n[% manip = date.manip %]\n[% manip.UnixDate(\"Noon Yesterday\",\"%Y %b %d %H:%M\") %]\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "Thierry-Michel Barral wrote the original plugin.\n\nAndy Wardley provided some minor fixups/enhancements, a test script and documentation.\n\nMark D. Mills cloned \"Date::Manip\" from the \"Date::Calc\" sub-plugin.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (C) 2000-2007 Thierry-Michel Barral, Andy Wardley.\n\nThis module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Template::Plugin, POSIX\n",
                "subsections": []
            }
        }
    }
}