# perldoc > Date::Parse

---
type: CommandReference
command: Date::Parse
mode: perldoc
section: 
source: perldoc
---

## Quick Reference

- `str2time($date)` — parse date string to Unix time
- `strptime($date)` — parse date string to array of time components
- `Date::Language->new('German')->str2time(...)` — parse dates in other languages

## Name

Date::Parse — Parse date strings into time values

## Synopsis

perl
use Date::Parse;
$time = str2time($date);
($ss,$mm,$hh,$day,$month,$year,$zone) = strptime($date);
## Functions

- `str2time(DATE, ZONE)` — parses DATE and returns a Unix time value, or undef on failure. ZONE, if given, specifies the timezone to assume when parsing if the date string does not specify one.
- `strptime(DATE, ZONE)` — same arguments as `str2time` but returns an array of values `($ss, $mm, $hh, $day, $month, $year, $zone, $century)`. Elements are only defined if they could be extracted from the date string. The `$zone` element is the timezone offset in seconds from GMT. An empty array is returned upon failure.

**Multi-language support:** Use `Date::Language` to parse dates in English, French, German, and Italian.

perl
use Date::Language;
my $lang = Date::Language->new('German');
$lang->str2time("25 Jun 1996 21:09:55 +0100");
## Examples

text
1995:01:24T09:08:17.1823213           ISO-8601
1995-01-24T09:08:17.1823213
Wed, 16 Jun 94 07:29:35 CST           Comma and day name are optional
Thu, 13 Oct 94 10:13:13 -0700
Wed, 9 Nov 1994 09:50:32 -0500 (EST)  Text in ()'s will be ignored.
21 dec 17:05                          Will be parsed in the current time zone
21-dec 17:05
21/dec 17:05
21/dec/93 17:05
1999 10:02:18 "GMT"
16 Nov 94 22:28:20 PST
## Limitations

- Date::Parse uses [Time::Local](https://metacpan.org/pod/Time::Local) internally, so it is limited to parsing dates that result in valid values for `Time::Local::timelocal`. This generally means dates between 1901-12-17 00:00:00 GMT and 2038-01-16 23:59:59 GMT.
- When both month and date are specified as numbers, the month number is always assumed to come before the date (American format). This is deterministic and not locale-aware. A future release may allow the programmer to specify the order.

## See Also

- [Date::Language](https://metacpan.org/pod/Date::Language)
- [Time::Local](https://metacpan.org/pod/Time::Local)
- [Time::Local::timelocal](https://metacpan.org/pod/Time::Local#timelocal)