{
    "content": [
        {
            "type": "text",
            "text": "# Date::Manip::DM6 (perldoc)\n\n## NAME\n\nDate::Manip::DM6 - Date manipulation routines\n\n## SYNOPSIS\n\nuse Date::Manip;\n$version = DateManipVersion($flag);\nDateInit(\"VAR=VAL\",\"VAR=VAL\",...);\n$date = ParseDate(\\@args [,@opts]);\n$date = ParseDate($string [,@opts]);\n$date = ParseDate(\\$string [,@opts]);\n$date = ParseDateString($string [,@opts]);\n$date = ParseDateFormat($format,$string);\n@date = UnixDate($date,@format);\n$date = UnixDate($date,@format);\n$delta = ParseDateDelta(\\@args   [,$mode]);\n$delta = ParseDateDelta($string  [,$mode]);\n$delta = ParseDateDelta(\\$string [,$mode]);\n@str = DeltaFormat($delta, [$mode,] $dec,@format);\n$str = DeltaFormat($delta, [$mode,] $dec,@format);\n$recur = ParseRecur($string,$base,$date0,$date1,$flags);\n@dates = ParseRecur($string,$base,$date0,$date1,$flags);\n$flag = DateCmp($date1,$date2);\n$d = DateCalc($d1,$d2 [,$errref] [,$mode]);\n$date = DateSetTime($date,$hr,$min,$sec);\n$date = DateSetTime($date,$time);\n$date = DateSetDateField($date,$field,$val [,$nocheck]);\n$date = DateGetPrev($date,$dow,$today,$hr,$min,$sec);\n$date = DateGetPrev($date,$dow,$today,$time);\n$date = DateGetNext($date,$dow,$today,$hr,$min,$sec);\n$date = DateGetNext($date,$dow,$today,$time);\n$name = DateIsHoliday($date);\n@name = DateIsHoliday($date);\n$listref = EventsList($date);\n$listref = EventsList($date0,$date1);\n$date = DateConvTZ($date,$from,$to);\n$flag = DateIsWorkDay($date [,$flag]);\n$date = DateNextWorkDay($date,$off [,$time]);\n$date = DatePrevWorkDay($date,$off [,$time]);\n$date = DateNearestWorkDay($date [,$tomorrowfirst]);\nIn the following routines, $y may be entered as either a 2 or 4 digit year (it will be converted\nto a 4 digit year based on the variable YYtoYYYY described below). Month and day should be\nnumeric in all cases.\n$day = DateDayOfWeek($m,$d,$y);\n$secs = DateSecsSince1970($m,$d,$y,$h,$mn,$s);\n$secs = DateSecsSince1970GMT($m,$d,$y,$h,$mn,$s);\n$days = DateDaysSince1BC($m,$d,$y);\n$day = DateDayOfYear($m,$d,$y);\n($y,$m,$d,$h,$mn,$s) = DateNthDayOfYear($y,$n);\n$days = DateDaysInYear($y);\n$days = DateDaysInMonth($m,$y);\n$wkno = DateWeekOfYear($m,$d,$y,$first);\n$flag = DateLeapYear($y);\n$day = DateDaySuffix($d);\n$tz = DateTimeZone();\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **ROUTINES**\n- **SEE ALSO**\n- **LICENSE**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Date::Manip::DM6",
        "section": "",
        "mode": "perldoc",
        "summary": "Date::Manip::DM6 - Date manipulation routines",
        "synopsis": "use Date::Manip;\n$version = DateManipVersion($flag);\nDateInit(\"VAR=VAL\",\"VAR=VAL\",...);\n$date = ParseDate(\\@args [,@opts]);\n$date = ParseDate($string [,@opts]);\n$date = ParseDate(\\$string [,@opts]);\n$date = ParseDateString($string [,@opts]);\n$date = ParseDateFormat($format,$string);\n@date = UnixDate($date,@format);\n$date = UnixDate($date,@format);\n$delta = ParseDateDelta(\\@args   [,$mode]);\n$delta = ParseDateDelta($string  [,$mode]);\n$delta = ParseDateDelta(\\$string [,$mode]);\n@str = DeltaFormat($delta, [$mode,] $dec,@format);\n$str = DeltaFormat($delta, [$mode,] $dec,@format);\n$recur = ParseRecur($string,$base,$date0,$date1,$flags);\n@dates = ParseRecur($string,$base,$date0,$date1,$flags);\n$flag = DateCmp($date1,$date2);\n$d = DateCalc($d1,$d2 [,$errref] [,$mode]);\n$date = DateSetTime($date,$hr,$min,$sec);\n$date = DateSetTime($date,$time);\n$date = DateSetDateField($date,$field,$val [,$nocheck]);\n$date = DateGetPrev($date,$dow,$today,$hr,$min,$sec);\n$date = DateGetPrev($date,$dow,$today,$time);\n$date = DateGetNext($date,$dow,$today,$hr,$min,$sec);\n$date = DateGetNext($date,$dow,$today,$time);\n$name = DateIsHoliday($date);\n@name = DateIsHoliday($date);\n$listref = EventsList($date);\n$listref = EventsList($date0,$date1);\n$date = DateConvTZ($date,$from,$to);\n$flag = DateIsWorkDay($date [,$flag]);\n$date = DateNextWorkDay($date,$off [,$time]);\n$date = DatePrevWorkDay($date,$off [,$time]);\n$date = DateNearestWorkDay($date [,$tomorrowfirst]);\nIn the following routines, $y may be entered as either a 2 or 4 digit year (it will be converted\nto a 4 digit year based on the variable YYtoYYYY described below). Month and day should be\nnumeric in all cases.\n$day = DateDayOfWeek($m,$d,$y);\n$secs = DateSecsSince1970($m,$d,$y,$h,$mn,$s);\n$secs = DateSecsSince1970GMT($m,$d,$y,$h,$mn,$s);\n$days = DateDaysSince1BC($m,$d,$y);\n$day = DateDayOfYear($m,$d,$y);\n($y,$m,$d,$h,$mn,$s) = DateNthDayOfYear($y,$n);\n$days = DateDaysInYear($y);\n$days = DateDaysInMonth($m,$y);\n$wkno = DateWeekOfYear($m,$d,$y,$first);\n$flag = DateLeapYear($y);\n$day = DateDaySuffix($d);\n$tz = DateTimeZone();",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 75,
                "subsections": []
            },
            {
                "name": "ROUTINES",
                "lines": 505,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Date::Manip::DM6 - Date manipulation routines\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Date::Manip;\n\n$version = DateManipVersion($flag);\n\nDateInit(\"VAR=VAL\",\"VAR=VAL\",...);\n\n$date = ParseDate(\\@args [,@opts]);\n$date = ParseDate($string [,@opts]);\n$date = ParseDate(\\$string [,@opts]);\n\n$date = ParseDateString($string [,@opts]);\n\n$date = ParseDateFormat($format,$string);\n\n@date = UnixDate($date,@format);\n$date = UnixDate($date,@format);\n\n$delta = ParseDateDelta(\\@args   [,$mode]);\n$delta = ParseDateDelta($string  [,$mode]);\n$delta = ParseDateDelta(\\$string [,$mode]);\n\n@str = DeltaFormat($delta, [$mode,] $dec,@format);\n$str = DeltaFormat($delta, [$mode,] $dec,@format);\n\n$recur = ParseRecur($string,$base,$date0,$date1,$flags);\n@dates = ParseRecur($string,$base,$date0,$date1,$flags);\n\n$flag = DateCmp($date1,$date2);\n\n$d = DateCalc($d1,$d2 [,$errref] [,$mode]);\n\n$date = DateSetTime($date,$hr,$min,$sec);\n$date = DateSetTime($date,$time);\n\n$date = DateSetDateField($date,$field,$val [,$nocheck]);\n\n$date = DateGetPrev($date,$dow,$today,$hr,$min,$sec);\n$date = DateGetPrev($date,$dow,$today,$time);\n\n$date = DateGetNext($date,$dow,$today,$hr,$min,$sec);\n$date = DateGetNext($date,$dow,$today,$time);\n\n$name = DateIsHoliday($date);\n@name = DateIsHoliday($date);\n\n$listref = EventsList($date);\n$listref = EventsList($date0,$date1);\n\n$date = DateConvTZ($date,$from,$to);\n\n$flag = DateIsWorkDay($date [,$flag]);\n\n$date = DateNextWorkDay($date,$off [,$time]);\n\n$date = DatePrevWorkDay($date,$off [,$time]);\n\n$date = DateNearestWorkDay($date [,$tomorrowfirst]);\n\nIn the following routines, $y may be entered as either a 2 or 4 digit year (it will be converted\nto a 4 digit year based on the variable YYtoYYYY described below). Month and day should be\nnumeric in all cases.\n\n$day = DateDayOfWeek($m,$d,$y);\n$secs = DateSecsSince1970($m,$d,$y,$h,$mn,$s);\n$secs = DateSecsSince1970GMT($m,$d,$y,$h,$mn,$s);\n$days = DateDaysSince1BC($m,$d,$y);\n$day = DateDayOfYear($m,$d,$y);\n($y,$m,$d,$h,$mn,$s) = DateNthDayOfYear($y,$n);\n$days = DateDaysInYear($y);\n$days = DateDaysInMonth($m,$y);\n$wkno = DateWeekOfYear($m,$d,$y,$first);\n$flag = DateLeapYear($y);\n$day = DateDaySuffix($d);\n$tz = DateTimeZone();\n",
                "subsections": []
            },
            "ROUTINES": {
                "content": "DateManipVersion\n$version = DateManipVersion($flag);\n\nReturns the version of Date::Manip. If $flag is non-zero, timezone information is also\nreturned.\n\nDateInit\nDateInit(\"VAR=VAL\",\"VAR=VAL\",...);\n\nThe DateInit function is used to set any of the Date::Manip configuration variables\ndescribed in the Date::Manip::Config document.\n\nThe strings to pass in are of the form \"VAR=VAL\". Any number may be included and they can\ncome in any order. VAR may be any configuration variable. VAL is any allowed value for that\nvariable. For example, to switch from English to French and use non-US format (so that 12/10\nis Oct 12), do the following:\n\nDateInit(\"Language=French\",\"DateFormat=non-US\");\n\nNote that variables are parsed in the order they are given, so \"DateFormat=non-US\",\n\"ConfigFile=./manip.cnf\" may not give the expected result. To be safe, ConfigFile should\nalways appear first in the list.\n\nParseDate\n$date = ParseDate(\\@args [,@opts]);\n$date = ParseDate($string [,@opts]);\n$date = ParseDate(\\$string [,@opts]);\n\nThis takes an array or a string containing a date and parses it. When the date is included\nas an array (for example, the arguments to a program) the array should contain a valid date\nin the first one or more elements (elements after a valid date are ignored). Elements\ncontaining a valid date are shifted from the array. The largest possible number of elements\nwhich can be correctly interpreted as a valid date are always used. If a string is entered\nrather than an array, that string is tested for a valid date. The string is unmodified, even\nif passed in by reference.\n\nThe ParseDate routine is primarily used to handle command line arguments. If you have a\ncommand where you want to enter a date as a command line argument, you can use Date::Manip\nto make something like the following work:\n\nmycommand -date Dec 10 1997 -arg -arg2\n\nNo more reading man pages to find out what date format is required in a man page.\n\nThe @opts argument may contain values that can be passed to the \"Date::Manip::Date::parse\"\nmethod.\n\nHistorical note: this is originally why the Date::Manip routines were written (though long\nbefore they were released as the Date::Manip module). I was using a bunch of programs\n(primarily batch queue managers) where dates and times were entered as command line options\nand I was getting highly annoyed at the many different (but not compatible) ways that they\nhad to be entered. Date::Manip originally consisted of basically 1 routine which I could\npass \"@ARGV\" to and have it remove a date from the beginning.\n\nParseDateString\n$date = ParseDateString($string [,@opts]);\n\nThis parses a string containing a date and returns it. Refer to the Date::Manip::Date\ndocumentation for valid date formats. The date returned is in the local time zone.\n\nThe @opts argument may contain values that can be passed to the \"Date::Manip::Date::parse\"\nmethod.\n\nParseDateFormat\n$date = ParseDateFormat($format,$string);\n\nThis parses a string containing a date based on a format string and returns the date. Refer\nto the Date::Manip::Date documentation for the parseformat method for more information. The\ndate returned is in the local time zone.\n\nUnixDate\n$out = UnixDate($date,$in);\n@out = UnixDate($date,@in);\n\nThis takes a date and a list of strings containing formats roughly identical to the format\nstrings used by the UNIX date(1) command. Each format is parsed and an array of strings\ncorresponding to each format is returned.\n\nThe formats are described in the Date::Manip::Date document.\n\nParseDateDelta\n$delta = ParseDateDelta(\\@args   [,$mode]);\n$delta = ParseDateDelta($string  [,$mode]);\n$delta = ParseDateDelta(\\$string [,$mode]);\n\nIn the first form, it takes an array and shifts a valid delta from it. In the other two\nforms, it parses a string to see if it contains a valid delta.\n\nA valid delta is returned if found. Otherwise, an empty string is returned.\n\nThe delta can be converted to 'exact', 'semi', or 'approx' using the\nDate::Manip::Delta::convert method if $mode is passed in.\n\nDeltaFormat\n$out = DeltaFormat($delta [,$mode], $dec,$in);\n@out = DeltaFormat($delta [,$mode], $dec,@in);\n\nThis is similar to the UnixDate routine except that it extracts information from a delta.\n\nWhen formatting fields in a delta, the Date::Manip 6.00 formats have changed and are much\nmore powerful. The old 5.xx formats are still available for the DeltaFormat command for\nbackward compatibility. These formats include:\n\n%Xv  : print the value of the field X\n\n%Xd  : print the value of the field X and all\nsmaller units in terms of X\n\n%Xh  : print the value of field X and all\nlarger units in terms of X\n\n%Xt  : print the value of all fields in\nterms of X\n\nThese make use of the $mode and $dec arguments to determine how to format the information.\n\n$dec is an integer, and is required, It tells the number of decimal places to use.\n\n$mode is either \"exact\", \"semi\", or \"approx\" and defaults to \"exact\" if it is not included.\n\nIn \"exact\" mode, only exact relationships are used. This means that there can be no mixing\nof the Y/M, W/D, and H/MN/S segments (for non-business deltas, or Y/M, W, and D/H/MN/S\nsegments for business deltas) because there is no exact relation between the fields of each\nset.\n\nIn \"semi\" mode, the semi-approximate relationships are used so there is no mixing between\nY/M and W/D/H/MN/S.\n\nIn \"approx\" mode, approximate relationships are used so all fields can mix.\n\nThe semi-approximate and approximate relationships are described in the Date::Manip::Delta\nmanual.\n\nSo, in \"exact\" mode, with a non-business delta, and $dec = 2, the following are equivalent:\n\nold style    new style\n---------    ---------\n%Xv          %Xv\n%hd          %.2hhs\n%hh          %.2hdh\n%ht          %.2hds\n%yd          %.2yyM\n\nIn \"approximate\" mode, the following are equivalent:\n\nold style    new style\n---------    ---------\n%Xv          %Xv\n%hd          %.2hhs\n%hh          %.2hdh\n%ht          %.2hys\n%yd          %.2yys\n\nIf you want to use the new style formats in DeltaFormat, use one of the calls:\n\nDeltaFormat($delta, @in);\nDeltaFormat($delta, undef, @in);\n\nIf the first element of @in is an integer, you have to use the 2nd form.\n\nThe old formats will remain available for the time being, though at some point they may be\ndeprecated.\n\nDateCalc\n$d = DateCalc($d1,$d2 [,\\$err] [,$mode]);\n\nThis takes two dates, deltas, or one of each and performs the appropriate calculation with\nthem. Dates must be a string that can be parsed by ParseDateString. Deltas must be a string\nthat can be parsed by ParseDateDelta. Two deltas add together to form a third delta. A date\nand a delta returns a 2nd date. Two dates return a delta (the difference between the two\ndates).\n\nSince the two items can be interpreted as either dates or deltas, and since many strings can\nbe interpreted as both a date or a delta, it is a good idea to pass the input through\nParseDateDelta, if appropriate if there is any ambiguity. For example, the string \"09:00:00\"\ncan be interpreted either as a date (today at 9:00:00) or a delta (9 hours). To avoid\nunexpected results, avoid calling DateCalc as:\n\n$d = DateCalc(\"09:00:00\",$someothervalue);\n\nInstead, call it as:\n\n$d = DateCalc(ParseDate(\"09:00:00\"),$someothervalue);\n\nto force it to be a date, or:\n\n$d = DateCalc(ParseDateDelta(\"09:00:00\"),$someothervalue);\n\nto force it to be a delta. This will avoid unexpected results. Passing something through\nParseDate is optional since they will be treated as dates by default (and for performance\nreasons, you're better off not calling ParseDate).\n\nIf there is no ambiguity, you are better off NOT doing this for performance reasons. If the\ndelta is a business delta, you definitely should NOT do this.\n\nOne other thing to note is that when parsing dates, a delta can be interpreted as a date\nrelative to now. DateCalc will ALWAYS treat a delta as a delta, NOT a date.\n\nFor details on how calculations are done, refer to the Date::Manip::Calc documentation.\n\nBy default, math is done using an exact mode.\n\nIf two deltas, or a date and a delta are passed in, $mode may be used to force the delta to\nbe either business or non-business mode deltas. If $mode is 0 or 1, the delta(s) will be\nnon-business. Otherwise, they will be business deltas. If $mode is passed in, it will be\nused only if the business or non-business state was not explicitly set in the delta. $mode\ncan also be any of the modes discussed in the Date::Manip::Calc documentation.\n\nIf two dates are passed in, $mode is used to determine the type of calculation. By default,\nan exact delta is produced. If $mode is 1, an approximate delta is produced. If $mode is 2,\na business approximate (bapprox) mode calculation is done. If $mode is 3, a exact business\nmode delta is produced.\n\nIf \\$err is passed in, it is set to:\n\n1 is returned if $d1 is not a delta or date\n2 is returned if $d2 is not a delta or date\n3 if any other error occurs.\n\nThis argument is optional, but if included, it must come before $mode.\n\nNothing is returned if an error occurs.\n\nParseRecur\n$recur = ParseRecur($string [,$base,$date0,$date1,$flags]);\n@dates = ParseRecur($string [,$base,$date0,$date1,$flags]);\n\nThis parses a string containing a recurrence and returns a fully specified recurrence, or a\nlist of dates referred to.\n\n$string can be any of the forms:\n\nFREQ\nFREQ*FLAGS\nFREQ*FLAGS*BASE\nFREQ*FLAGS*BASE*DATE0\nFREQ*FLAGS*BASE*DATE0*DATE1\n\nwhere FREQ is a frequence (see the Date::Manip::Delta documentation), FLAGS is a comma\nseparated list of flags, and BASE, DATE0, and DATE1 are date strings. The dates and flags\ncan also be passed in as $base, $date0, $date1, and $flags, and these will override any\nvalues in $string.\n\nIn scalar context, the fully specified recurrence (or as much information as is available)\nwill be returned. In list context, a list of dates will be returned.\n\nDateCmp\n$flag = DateCmp($date1,$date2);\n\nThis takes two dates and compares them. Any dates that can be parsed will be compared.\n\nDateGetPrev\n$date = DateGetPrev($date,$dow, $curr [,$hr,$min,$sec]);\n$date = DateGetPrev($date,$dow, $curr [,$time]);\n$date = DateGetPrev($date,undef,$curr,$hr,$min,$sec);\n$date = DateGetPrev($date,undef,$curr,$time);\n\nThis takes a date (any string that may be parsed by ParseDateString) and finds the previous\noccurrence of either a day of the week, or a certain time of day.\n\nThis is documented in the \"prev\" method in Date::Manip::Date, except that here, $time is a\nstring (HH, HH:MN:, or HH:MN:SS), and $dow may be a string of the form \"Fri\" or \"Friday\".\n\nDateGetNext\n$date = DateGetNext($date,$dow, $curr [,$hr,$min,$sec]);\n$date = DateGetNext($date,$dow, $curr [,$time]);\n$date = DateGetNext($date,undef,$curr,$hr,$min,$sec);\n$date = DateGetNext($date,undef,$curr,$time);\n\nSimilar to DateGetPrev.\n\nDateSetTime\n$date = DateSetTime($date,$hr,$min,$sec);\n$date = DateSetTime($date,$time);\n\nThis takes a date (any string that may be parsed by ParseDateString) and sets the time in\nthat date. For example, one way to get the time for 7:30 tomorrow would be to use the lines:\n\n$date = ParseDate(\"tomorrow\");\n$date = DateSetTime($date,\"7:30\");\n\n$time is a string (HH, HH:MN, or HH:MN:SS).\n\nDateSetDateField\n$date = DateSetDateField($date,$field,$val);\n\nThis takes a date and sets one of its fields to a new value. $field is any of the strings\n\"y\", \"m\", \"d\", \"h\", \"mn\", \"s\" (case insensitive) and $val is the new value.\n\nDateIsHoliday\n$name = DateIsHoliday($date);\n@name = DateIsHoliday($date);\n\nThis returns undef if $date is not a holiday, or a string containing the name of the holiday\notherwise (or a list of names in list context). An empty string is returned for an unnamed\nholiday.\n\nDateIsWorkDay\n$flag = DateIsWorkDay($date [,$flag]);\n\nThis returns 1 if $date is a work day. If $flag is non-zero, the time is checked to see if\nit falls within work hours. It returns an empty string if $date is not valid.\n\nEventsList\n$ref = EventsList($date);\n$ref = EventsList($date,0      [,$flag]);\n$ref = EventsList($date,$date1 [,$flag]);\n\nThis returns a list of events. If $flag is not given, or is equal to 0, the list (returned\nas a reference) is similar to the the list returned by the Date::Manip::Date::listevents\nmethod with $format = \"dates\". The only difference is that it is formatted slightly\ndifferent to be backward compatible with Date::Manip 5.xx.\n\nThe data from the listevents method is:\n\n( [DATE1, NAME1a, NAME1b, ...],\n[DATE2, NAME2a, NAME2b, ...],\n...\n)\n\nThe reference returned from EventsList (if $flag = 0) is:\n\n[ DATE1, [NAME1a, NAME1b, ...],\nDATE2, [DATE2a, DATE2b, ...],\n...\n]\n\nFor example, if the following events are defined:\n\n2000-01-01 ; 2000-03-21  = Winter\n2000-03-22 ; 2000-06-21  = Spring\n2000-02-01               = Event1\n2000-05-01               = Event2\n2000-04-01-12:00:00      = Event3\n\nthe following examples illustrate the function:\n\nEventsList(\"2000-04-01\")\n=> [ 2000040100:00:00, [ Spring ] ]\n\nEventsList(\"2000-04-01 12:30\");\n=> [ 2000040112:30:00, [ Spring, Event3 ] ]\n\nEventsList(\"2000-04-01\",0);\n=> [ 2000040100:00:00, [ Spring ],\n2000040112:00:00, [ Spring, Event3 ],\n2000040113:00:00, [ Spring ] ]\n\nEventsList(\"2000-03-15\",\"2000-04-10\");\n=> [ 2000031500:00:00, [ Winter ],\n2000032200:00:00, [ Spring ]\n2000040112:00:00, [ Spring, Event3 ]\n2000040113:00:00, [ Spring ] ]\n\nIf $flag is 1, then a tally of the amount of time given to each event is returned. Time for\nwhich two or more events apply is counted for both.\n\nEventsList(\"2000-03-15\",\"2000-04-10\",1);\n=> { Event3 => +0:0:+0:0:1:0:0,\nSpring => +0:0:+2:4:23:0:0,\nWinter => +0:0:+1:0:0:0:0\n}\n\nWhen $flag is 2, a more complex tally with no event counted twice is returned.\n\nEventsList(\"2000-03-15\",\"2000-04-10\",2);\n=> { Event3+Spring => +0:0:+0:0:1:0:0,\nSpring        => +0:0:+2:4:22:0:0,\nWinter        => +0:0:+1:0:0:0:0\n}\n\nThe hash contains one element for each combination of events.\n\nIn both of these cases, there may be a hash element with an empty string as the key which\ncontains the amount of time with no events active.\n\nDateDayOfWeek\n$day = DateDayOfWeek($m,$d,$y);\n\nReturns the day of the week (1 for Monday, 7 for Sunday).\n\nDateSecsSince1970\n$secs = DateSecsSince1970($m,$d,$y,$h,$mn,$s);\n\nReturns the number of seconds since Jan 1, 1970 00:00 (negative if date is earlier) in the\ncurrent timezone.\n\nDateSecsSince1970GMT\n$secs = DateSecsSince1970GMT($m,$d,$y,$h,$mn,$s);\n\nReturns the number of seconds since Jan 1, 1970 00:00 GMT (negative if date is earlier).\nNote that the date is still given in the current timezone, NOT GMT.\n\nDateDaysSince1BC\n$days = DateDaysSince1BC($m,$d,$y);\n\nReturns the number of days since Dec 31, 1BC. This includes the year 0001.\n\nDateDayOfYear\n$day = DateDayOfYear($m,$d,$y);\n\nReturns the day of the year (1 to 366)\n\nDateNthDayOfYear\n($y,$m,$d,$h,$mn,$s) = DateNthDayOfYear($y,$n);\n\nReturns the year, month, day, hour, minutes, and decimal seconds given a floating point day\nof the year.\n\nAll arguments must be numeric. $n must be greater than or equal to 1 and less than 366 on\nnon-leap years and 367 on leap years.\n\nNOTE: When $n is a decimal number, the results are non-intuitive perhaps. Day 1 is Jan 01\n00:00. Day 2 is Jan 02 00:00. Intuitively, you might think of day 1.5 as being 1.5 days\nafter Jan 01 00:00, but this would mean that Day 1.5 was Jan 02 12:00 (which is later than\nDay 2). The best way to think of this function is a time line starting at 1 and ending at\n366 (in a non-leap year). In terms of a delta, think of $n as the number of days after Dec\n31 00:00 of the previous year.\n\nDateDaysInYear\n$days = DateDaysInYear($y);\n\nReturns the number of days in the year (365 or 366)\n\nDateDaysInMonth\n$days = DateDaysInMonth($m,$y);\n\nReturns the number of days in the month.\n\nDateWeekOfYear\n$wkno = DateWeekOfYear($m,$d,$y,$first);\n\nFigure out week number. $first is the first day of the week which is usually 1 (Monday) or 7\n(Sunday), but could be any number between 1 and 7 in practice.\n\nNOTE: This routine should only be called in rare cases. Use UnixDate with the %W, %U, %J, %L\nformats instead. This routine returns a week between 0 and 53 which must then be \"fixed\" to\nget into the ISO-8601 weeks from 1 to 53. A date which returns a week of 0 actually belongs\nto the last week of the previous year. A date which returns a week of 53 may belong to the\nfirst week of the next year.\n\nDateLeapYear\n$flag = DateLeapYear($y);\n\nReturns 1 if the argument is a leap year Written by David Muir Sharnoff <muir@idiom.com>\n\nDateDaySuffix\n$day = DateDaySuffix($d);\n\nAdd `st', `nd', `rd', `th' to a date (i.e. 1st, 22nd, 29th). Works for international dates.\n\nDateTimeZone\n$tz = DateTimeZone;\n\nThis determines and returns the local time zone. If it is unable to determine the local time\nzone, the following error occurs:\n\nERROR: Date::Manip unable to determine Time Zone.\n\nSee the Date::Manip::TZ documentation (DETERMINING THE LOCAL TIME ZONE) for more\ninformation.\n\nDateConvTZ\n$date = DateConvTZ($date,$from,$to);\n\nThis converts a date (which MUST be in the format returned by ParseDate) from one time zone\nto another.\n\n$from and $to each default to the local time zone. If they are given, they must be any time\nzone or alias understood by Date::Manip.\n\nIf an error occurs, an empty string is returned.\n\nDateNextWorkDay\n$date = DateNextWorkDay($date,$off [,$time]);\n\nFinds the day $off work days from now. If $time is passed in, we must also take into account\nthe time of day.\n\nIf $time is not passed in, day 0 is today (if today is a workday) or the next work day if it\nisn't. In any case, the time of day is unaffected.\n\nIf $time is passed in, day 0 is now (if now is part of a workday) or the start of the very\nnext work day.\n\nDatePrevWorkDay\n$date = DatePrevWorkDay($date,$off [,$time]);\n\nSimilar to DateNextWorkDay.\n\nDateNearestWorkDay\n$date = DateNearestWorkDay($date [,$tomorrowfirst]);\n\nThis looks for the work day nearest to $date. If $date is a work day, it is returned.\nOtherwise, it will look forward or backwards in time 1 day at a time until a work day is\nfound. If $tomorrowfirst is non-zero (or if it is omitted and the config variable\nTomorrowFirst is non-zero), we look to the future first. Otherwise, we look in the past\nfirst. In other words, in a normal week, if $date is Wednesday, $date is returned. If $date\nis Saturday, Friday is returned. If $date is Sunday, Monday is returned. If Wednesday is a\nholiday, Thursday is returned if $tomorrowfirst is non-nil or Tuesday otherwise.\n\nFor all of the functions which return a date, the format of the returned date is governed by the\nPrintable config variable. If a date is returned, it is in the local time zone, NOT the time\nzone the date was parsed in.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Date::Manip - main module documentation\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "This script is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Sullivan Beck (sbeck@cpan.org)\n",
                "subsections": []
            }
        }
    }
}