libapa...R::Date(3pm)
π APR::Date β the manual page, but make it bestie π
okay so this is libapa...R::Date(3pm) from the User Contributed Perl Documentation, and it's literally just Perl's lil interface to the APR date manipulating functions. she's small, she's cute, she parses your dates. periodt. π
β¨ NAME β¨
APR::Date β Perl API for APR date manipulating functions πΈ
β¨ Synopsis β¨
bestie here's the vibe in code form:
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 β¨
so APR::Socket provides the Perl interface to APR date manipulating functions. yes bestie, that's what it says β the description mentions APR::Socket and honestly? iconic of it. π
β¨ API β¨
APR::Date gives you the following functions and/or methods, and we're gonna go through every single one like the queens they are π
π parse_http
she parses HTTP date strings. that's her whole job and she eats every time.
$date_parsed = parse_http($date_string);
arg1: $date_string ( string )
the date string can be in one of these formats, no cap:
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). like, she's assuming GMT no matter what timezone you hand her. that's just the rules π¦
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.
β οΈ also!! if$date_parsedcomes back as0, that could mean out of range OR invalid. she does not distinguish. just so you know bestie π
since: 2.0.00
π‘ Remember to divide the return value by 1_000_000 if you need it in seconds. do NOT forget this. she's giving microseconds, not seconds, and mixing those up is a whole vibe check fail π
π parse_rfc
she parses 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(). she's the chill one. she says yes more often π«Ά
$date_parsed = parse_rfc($date_string);
arg1: $date_string ( string )
the date string can be in one of these formats β and yes, there are a LOT of them, we're listing all of them:
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 by1_000_000if you need it in seconds. same deal as her sister function.1_000_000. write it down. actually don't, just read it again here π
β¨ See Also β¨
mod_perl 2.0 documentation. go read it, bestie, she's thorough πβ¨
β¨ 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. slay, team ππ
and that's the whole page, bestie!! ππ this was perl v5.42.3, dated 2026-08-20, and it's the libapa...R::Date(3pm) page from the User Contributed Perl Documentation. go forth and parse those dates, you absolute main character π¦π
π¦ where this page comes from
- ubuntu stonking: libapache2-mod-perl2 2.0.13-2build3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms