This manual page is for Mac OS X version 10.6

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



apache_mod_perl-103~96::mod_perl-2.0.oo_perl-2.0.4::docs::api::APR::Date(3)



NAME
       APR::Date - Perl API for APR date manipulating functions

Synopsis
         use APR::Date ();

         # parse HTTP-complient date string
         $date_string = 'Sun, 06 Nov 1994 08:49:37 GMT';
         $date_parsed = APR::Date::parse_http($date_string);

         # parse RFC822-complient date string
         $date_string = 'Sun, 6 Nov 94 8:49:37 GMT';
         $date_parsed = APR::Date::parse_rfc($date_string);

Description
       "APR::Socket" provides the Perl interface to APR date manipulating functions.

API
       "APR::Date" provides the following functions and/or methods:

       "parse_http"

       Parse HTTP date strings

         $date_parsed = parse_http($date_string);

       arg1: $date_string ( string )
           The date string can be in one of the following formats:

             Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 822, updated by RFC 1123
             Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
             Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format

           refer to RFC2616 for the details (GMT is assumed, regardless of the used timezone).

       ret: $date_parsed ( number )
           the number of microseconds since 1 Jan 1970 GMT, or 0 if out of range or if the date is invalid.

       since: 2.0.00

       Remember to divide the return value by 1_000_000 if you need it in seconds.

       "parse_rfc"

       Parse a string resembling an RFC 822 date.  It's meant to be lenient in its parsing of dates.  Hence,
       this will parse a wider range of dates than "parse_http()".

         $date_parsed = parse_rfc($date_string);

       arg1: $date_string ( string )
           The date string can be in one of the following formats:

             Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 822, updated by RFC 1123
             Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
             Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
             Sun, 6 Nov 1994 08:49:37 GMT   ; RFC 822, updated by RFC 1123
             Sun, 06 Nov 94 08:49:37 GMT    ; RFC 822
             Sun, 6 Nov 94 08:49:37 GMT     ; RFC 822
             Sun, 06 Nov 94 08:49 GMT       ; Unknown [drtr\@ast.cam.ac.uk]
             Sun, 6 Nov 94 08:49 GMT        ; Unknown [drtr\@ast.cam.ac.uk]
             Sun, 06 Nov 94 8:49:37 GMT     ; Unknown [Elm 70.85]
             Sun, 6 Nov 94 8:49:37 GMT      ; Unknown [Elm 70.85]

       ret: $date_parsed ( number )
           the number of microseconds since 1 Jan 1970 GMT, or 0 if out of range or if the date is invalid.

       since: 2.0.00

       Remember to divide the return value by 1_000_000 if you need it in seconds.

See Also
       mod_perl 2.0 documentation.

Copyright
       mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.

Authors
       The mod_perl development team and numerous contributors.



perl v5.10.0                                 apac01l-103~96::mod_perl-2.0.4::docs::api::APR::Date(3)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.