mod_perl logo perl icon
previous page: APR::Const - Perl Interface for APR Constantspage up: mod_perl 2.0 APInext page: APR::Error - Perl API for APR/Apache/mod_perl exceptions

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






Practical mod_perl

Practical mod_perl

By Stas Bekman, Eric Cholet
The mod_perl Developer's Cookbook

The mod_perl Developer's Cookbook

By Geoffrey Young, Paul Lindner, Randy Kobes
mod_perl Pocket Reference

mod_perl Pocket Reference

By Andrew Ford
Writing Apache Modules with Perl and C

Writing Apache Modules with Perl and C

By Lincoln Stein, Doug MacEachern
Embedding Perl in HTML with Mason

Embedding Perl in HTML with Mason

By Dave Rolsky, Ken Williams
mod_perl2 User's Guide

mod_perl2 User's Guide

By Stas Bekman, Jim Brandt


Table of Contents

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);


TOP

Description

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



TOP

API

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



TOP

parse_http

Parse HTTP date strings

  $date_parsed = parse_http($date_string);

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



TOP

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);

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



TOP

See Also

mod_perl 2.0 documentation.



TOP

Copyright

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



TOP

Authors

The mod_perl development team and numerous contributors.






TOP
previous page: APR::Const - Perl Interface for APR Constantspage up: mod_perl 2.0 APInext page: APR::Error - Perl API for APR/Apache/mod_perl exceptions