{
    "mode": "info",
    "parameter": "Date::Parse",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/Date%3A%3AParse/json",
    "generated": "2026-07-05T11:57:56Z",
    "synopsis": "use Date::Parse;\n$time = str2time($date);\n($ss,$mm,$hh,$day,$month,$year,$zone) = strptime($date);",
    "sections": {
        "NAME": {
            "content": "Date::Parse - Parse date strings into time values\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Date::Parse;\n\n$time = str2time($date);\n\n($ss,$mm,$hh,$day,$month,$year,$zone) = strptime($date);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "\"Date::Parse\" provides two routines for parsing date strings into time\nvalues.\n\nstr2time(DATE [, ZONE])\n\"str2time\" parses \"DATE\" and returns a unix time value, or undef\nupon failure.  \"ZONE\", if given, specifies the timezone to assume\nwhen parsing if the date string does not specify a timezone.\n\nstrptime(DATE [, ZONE])\n\"strptime\" takes the same arguments as str2time but returns an\narray of values \"($ss,$mm,$hh,$day,$month,$year,$zone,$century)\".\nElements are only defined if they could be extracted from the date\nstring. The $zone element is the timezone offset in seconds from\nGMT. An empty array is returned upon failure.\n",
            "subsections": []
        },
        "MULTI-LANGUAGE SUPPORT": {
            "content": "Date::Parse is capable of parsing dates in several languages, these\ninclude English, French, German and Italian.\n\n$lang = Date::Language->new('German');\n$lang->str2time(\"25 Jun 1996 21:09:55 +0100\");\n",
            "subsections": []
        },
        "EXAMPLE DATES": {
            "content": "Below is a sample list of dates that are known to be parsable with\nDate::Parse\n\n1995:01:24T09:08:17.1823213           ISO-8601\n1995-01-24T09:08:17.1823213\nWed, 16 Jun 94 07:29:35 CST           Comma and day name are optional\nThu, 13 Oct 94 10:13:13 -0700\nWed, 9 Nov 1994 09:50:32 -0500 (EST)  Text in ()'s will be ignored.\n21 dec 17:05                          Will be parsed in the current time zone\n21-dec 17:05\n21/dec 17:05\n21/dec/93 17:05\n1999 10:02:18 \"GMT\"\n16 Nov 94 22:28:20 PST\n",
            "subsections": []
        },
        "LIMITATION": {
            "content": "Date::Parse uses Time::Local internally, so is limited to only parsing\ndates which result in valid values for Time::Local::timelocal. This\ngenerally means dates between 1901-12-17 00:00:00 GMT and 2038-01-16\n23:59:59 GMT\n",
            "subsections": []
        },
        "BUGS": {
            "content": "When both the month and the date are specified in the date as numbers\nthey are always parsed assuming that the month number comes before the\ndate. This is the usual format used in American dates.\n\nThe reason why it is like this and not dynamic is that it must be\ndeterministic. Several people have suggested using the current locale,\nbut this will not work as the date being parsed may not be in the\nformat of the current locale.\n\nMy plans to address this, which will be in a future release, is to\nallow the programmer to state what order they want these values parsed\nin.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Graham Barr <gbarr@pobox.com>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (c) 1995-2009 Graham Barr. This program is free software; you\ncan redistribute it and/or modify it under the same terms as Perl\nitself.\n\nperl v5.32.1                      2021-02-15                  Date::Parse(3pm)",
            "subsections": []
        }
    },
    "summary": "Date::Parse - Parse date strings into time values",
    "flags": [],
    "examples": [],
    "see_also": []
}