IPB
>  Man Pages > Linux > openSUSE 10.2 > Section 3 > Date::Parse man page

Date::Parse man page

Section 3 - openSUSE 10.2 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!


Date::Parse(3)        User Contributed Perl Documentation       Date::Parse(3)



NAME
       Date::Parse - Parse date strings into time values

SYNOPSIS
               use Date::Parse;

               $time = str2time($date);

               ($ss,$mm,$hh,$day,$month,$year,$zone) = strptime($date);

DESCRIPTION
       "Date::Parse" provides two routines for parsing date strings into time
       values.

       str2time(DATE [, ZONE])
           "str2time" parses "DATE" and returns a unix time value, or undef
           upon failure.  "ZONE", if given, specifies the timezone to assume
           when parsing if the date string does not specify a timezome.

       strptime(DATE [, ZONE])
           "strptime" takes the same arguments as str2time but returns an
           array of values "($ss,$mm,$hh,$day,$month,$year,$zone)". 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
       Date::Parse is capable of parsing dates in several languages, these are
       English, French, German and Italian.

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

EXAMPLE DATES
       Below is a sample list of dates that are known to be parsable with
       Date::Parse

        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

LIMITATION
       Date::Parse uses Time::Local internally, so is limited to only parsing
       dates which result in valid values for Time::Local::timelocal

BUGS
       When both the month and the date are specified in the date as numbers
       they are always parsed assuming that the month number comes before the
       date. This is the usual format used in American dates.

       The reason why it is like this and not dynamic is that it must be
       deterministic. Several people have suggested using the current locale,
       but this will not work as the date being parsed may not be in the for-
       mat of the current locale.

       My plans to address this, which will be in a future release, is to
       allow the programmer to state what order they want these values parsed
       in.

AUTHOR
       Graham Barr <gbarr@pobox.com>

COPYRIGHT
       Copyright (c) 1995 Graham Barr. All rights reserved. This program is
       free software; you can redistribute it and/or modify it under the same
       terms as Perl itself.



perl v5.8.8                       2006-11-25                    Date::Parse(3)


Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Sat Sep 8 16:37:00 GMT 2007

Your favourite pages:

No pages logged yet.
Trying to save cookie...

Top 10 most popular pages:

svn man page (6164 hits)
(FreeBSD 6.2)

sqlite3 man page (5598 hits)
(openSUSE 10.2)

adv_cap_autoneg man page (5045 hits)
(Solaris 10 11_06)

CPAN man page (4791 hits)
(Suse Linux 10.1)

ssh man page (4439 hits)
(Suse Linux 10.1)

ssh-socks5-proxy-connect man page (3525 hits)
(Solaris 10 11_06)

signal man page (3395 hits)
(Suse Linux 10.1)

netcat man page (3378 hits)
(Suse Linux 10.1)

pprosetup man page (2886 hits)
(Solaris 10 11_06)

startproc man page (2738 hits)
(Suse Linux 10.1)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Lift Passes :: PCB Layout Service :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum