SYNOPSIS

OPTIONS

Date parsing can also use options. The options are as follows:

FUZZY -> it's okay not to parse the entire date string
NOW -> the "current" time for relative times (defaults to time())
ZONE -> local timezone (defaults to $ENV{TZ})
WHOLE -> the whole input string must be parsed
GMT -> input time is assumed to be GMT, not localtime
UK -> prefer UK style dates (dd/mm over mm/dd)
DATE_REQUIRED -> do not default the date
TIME_REQUIRED -> do not default the time
NO_RELATIVE -> input time is not relative to NOW
TIMEFIRST -> try parsing time before date [not default]
PREFER_PAST -> when year or day of week is ambigueous, assume past
PREFER_FUTURE -> when year or day of week is ambigueous, assume future
SUBSECOND -> parse fraction seconds
VALIDATE -> only accept normal values for HHMMSS, YYMMDD. Otherwise
days like -1 might give the last day of the previous month.

Timezone formats:

Special formats:

DESCRIPTION

This module recognizes the above date/time formats. Usually a date and a time are specified. There are numerous options for controlling what is recognized and what is not.

The return code is always the time in seconds since January 1st, 1970 or undef if it was unable to parse the time.

If a timezone is specified it must be after the time. Year specifications can be tacked onto the end of absolute times.

If parsedate() is called from array context, then it will return two elements. On successful parses, it will return the seconds and what remains of its input string. On unsuccessful parses, it will return undef and an error string.