Mail::M...d::Date(3)
π NAME π
Mail::Message::Field::Date β message header field with uris. (yes bestie, the original description literally says "uris", we are not editing that, we respect the source π
)
Oh also β the top of this page calls itself Mail::M...d::Date(3) because the manpage header truncates long names. It's really Mail::Message::Field::Date(3). Mystery solved, you're welcome π΅οΈββοΈβ¨
π¦ INHERITANCE π¦
okay so the whole family tree, no cap:
Mail::Message::Field::Date
is a Mail::Message::Field::Structured
is a Mail::Message::Field::Full
is a Mail::Message::Field
is a Mail::Reporter
she's got main character energy and also four ancestors. iconic.
β¨ SYNOPSIS β¨
here's the vibe, literally the whole point:
my $f = Mail::Message::Field->new(Date => time);
my $f = Mail::Message::Field::Date->new(Date => time);
my $date = $f->date; # cleaned-up and validated
my $time = $date->time; # converted to POSIX time
you make a field, you get a cleaned-up and validated date back, and then you can turn that date into POSIX time. that's it. that's the post. π«Ά
π DESCRIPTION π
okay so real talk: dates are a little more tricky than it should be. like, genuinely. the formatting permits a few constructs more than other RFCs use for timestamps. for instance β and this is the fun part β a small subset of timezone abbreviations are permitted. so there's wiggle room. π
the studied date field will reformat the content into a standard form. so it reads your chaotic little date and gives you back something standardized. glow-up behavior fr fr.
extends "DESCRIPTION" in Mail::Message::Field::Structured.
π OVERLOADED π
extends "OVERLOADED" in Mail::Message::Field::Structured.
overload: "" stringificationβ inherited, see "OVERLOADED" inMail::Message::Field::Fulloverload: '""' stringificationβ inherited, see "OVERLOADED" inMail::Message::Fieldoverload: '0+' numificationβ inherited, see "OVERLOADED" inMail::Message::Fieldoverload: '<='> numeric comparisonβ inherited, see "OVERLOADED" inMail::Message::Fieldoverload: bool booleanβ inherited, see "OVERLOADED" inMail::Message::Fieldoverload: cmp string comparisonβ inherited, see "OVERLOADED" inMail::Message::Field
(yes, there are two stringification entries and they are slightly different. we do not question the ancestors. π§)
π₯ METHODS π₯
extends "METHODS" in Mail::Message::Field::Structured.
πΈ Constructors πΈ
extends "Constructors" in Mail::Message::Field::Structured.
$obj->clone()β inherited, see "Constructors" inMail::Message::Field$class->from($field, %options)β inherited, see "Constructors" inMail::Message::Field::Full$class->new($data)β inherited, see "METHODS" inMail::Message::Field::Structured
and here's the options table, keep up bestie, every single one:
-Option --Defined in --Default
attributes Mail::Message::Field::Structured <ignored>
charset Mail::Message::Field::Full undef
datum Mail::Message::Field::Structured undef
encoding Mail::Message::Field::Full 'q'
force Mail::Message::Field::Full false
language Mail::Message::Field::Full undef
attributes => \@attributes|\%attributescharset => $charsetdatum => $dateencoding => 'q'|'Q'|'b'|'B'force => BOOLEANlanguage => $language
Β» example:
my $mmfd = 'Mail::Message::Field::Date';
my $f = $mmfd->new(Date => time);
β Attributes β
extends "Attributes" in Mail::Message::Field::Structured.
$obj->Name()β inherited, see "Attributes" inMail::Message::Field$obj->body()β inherited, see "Attributes" inMail::Message::Field$obj->folded()β inherited, see "Attributes" inMail::Message::Field$obj->foldedBody( [$body] )β inherited, see "Attributes" inMail::Message::Field$obj->name()β inherited, see "Attributes" inMail::Message::Field$obj->unfoldedBody( [$body, [$wrap]] )β inherited, see "Attributes" inMail::Message::Field$obj->wellformedName( [STRING] )β inherited, see "Attributes" inMail::Message::Field
π¦ The field π¦
extends "The field" in Mail::Message::Field::Structured.
$any->isStructured( [$name] )β inherited, see "The field" inMail::Message::Field$obj->length()β inherited, see "The field" inMail::Message::Field$obj->nrLines()β inherited, see "The field" inMail::Message::Field$obj->print( [$fh] )β inherited, see "The field" inMail::Message::Field$obj->size()β inherited, see "The field" inMail::Message::Field$obj->string( [$wrap] )β inherited, see "The field" inMail::Message::Field$obj->toDisclose()β inherited, see "The field" inMail::Message::Field
π Access to the body π
extends "Access to the body" in Mail::Message::Field::Structured.
$obj->decodedBody(%options)β inherited, see "Access to the body" inMail::Message::Field::Full
π Access to the content π
extends "Access to the content" in Mail::Message::Field::Structured.
$obj->addAttribute(...)β attributes are not supported for date fields. nope, not a thing, don't try it.$obj->addresses()β inherited, see "Access to the content" inMail::Message::Field$obj->attrPairs()β inherited, see "Access to the content" inMail::Message::Field::Structured$obj->attribute( $object|<STRING, %options>|<$name,$value,%options> )β inherited, see "Access to the content" inMail::Message::Field::Structured$obj->attributes()β inherited, see "Access to the content" inMail::Message::Field::Structured$obj->beautify()β inherited, see "Access to the content" inMail::Message::Field::Full$obj->comment( [STRING] )β inherited, see "Access to the content" inMail::Message::Field$any->createComment(STRING, %options)β inherited, see "Access to the content" inMail::Message::Field::Full$any->createPhrase(STRING, %options)β inherited, see "Access to the content" inMail::Message::Field::Full$obj->date()β the validated and standardized date representation for this field. and if the body of this field is not recognized? then this returnsundef. sad but honest. π$any->dateToTimestamp(STRING)β inherited, see "Access to the content" inMail::Message::Field$any->stripCFWS( [STRING] )β inherited, see "Access to the content" inMail::Message::Field$obj->study()β inherited, see "Access to the content" inMail::Message::Field$obj->time()β convert date into a timestamp, as produced withPOSIX::time().$any->toDate( [$time] )β inherited, see "Access to the content" inMail::Message::Field$obj->toInt()β inherited, see "Access to the content" inMail::Message::Field
π§ Internals π§
extends "Internals" in Mail::Message::Field::Structured.
$any->decode(STRING, %options)β inherited, see "Internals" inMail::Message::Field::Full$obj->encode(STRING, %options)β inherited, see "Internals" inMail::Message::Field::Full
π Parsing π
extends "Parsing" in Mail::Message::Field::Structured.
$obj->consume( $line | <$name,<$body|$objects>> )β inherited, see "Parsing" inMail::Message::Field$any->consumeComment(STRING)β inherited, see "Parsing" inMail::Message::Field::Full$obj->consumeDotAtom(STRING)β inherited, see "Parsing" inMail::Message::Field::Full$any->consumePhrase(STRING)β inherited, see "Parsing" inMail::Message::Field::Full$obj->datum( [$value] )β inherited, see "Parsing" inMail::Message::Field::Structured$obj->defaultWrapLength( [$length] )β inherited, see "Parsing" inMail::Message::Field$any->fold( $name, $body, [$maxchars] )β inherited, see "Parsing" inMail::Message::Field$obj->parse(STRING)β inherited, see "Parsing" inMail::Message::Field::Full$obj->produceBody()β inherited, see "Parsing" inMail::Message::Field::Full$obj->setWrapLength( [$length] )β inherited, see "Parsing" inMail::Message::Field$obj->stringifyData(STRING|ARRAY|$objects)β inherited, see "Parsing" inMail::Message::Field$obj->unfold(STRING)β inherited, see "Parsing" inMail::Message::Field
π Error handling π
extends "Error handling" in Mail::Message::Field::Structured.
$obj->AUTOLOAD()β inherited, see "Error handling" inMail::Reporter$obj->notImplemented()β inherited, see "Error handling" inMail::Reporter
π Cleanup π
extends "Cleanup" in Mail::Message::Field::Structured.
$obj->DESTROY()β inherited, see "Cleanup" inMail::Reporter
π DETAILS π
extends "DETAILS" in Mail::Message::Field::Structured.
(she's giving "the details are in the parent class" and honestly? valid.)
π DIAGNOSTICS π
- Error: class $package does not implement method $method. fatal error: the specific
$package(or one of its superclasses) does not implement this method where it should. this message means that some other related classes do implement this method however the class at hand does not. probably you should investigate this and probably inform the author of the package. cast bynotImplemented() - Warning: field content is not numerical: $content the numeric value of a field is requested (for instance the
LinesorContent-Lengthfields should be numerical), however the data contains weird characters. cast bytoInt() - Error: field name too long (max $count), in '$name'. it is not specified in the RFCs how long a field name can be, but at least it should be a few characters shorter than the line wrap. cast by
fold() - Warning: illegal character in charset '$name'. the field is created with an utf8 string which only contains data from the specified character set. however, that character set can never be a valid name because it contains characters which are not permitted. cast by
encode() - Warning: illegal character in field name $name. a new field is being created which does contain characters not permitted by the RFCs. using this field in messages may break other e-mail clients or transfer agents, and therefore mutulate or extinguish your message. so maybe don't? cast by
consume() - Warning: illegal character in language '$name'. the field is created with data which is specified to be in a certain language, however, the name of the language cannot be valid: it contains characters which are not permitted by the RFCs. cast by
encode() - Warning: illegal encoding '$name', using 'q'. the RFCs only permit base64 (
borB) or quoted-printable (qorQ) encoding. other than these four options are illegal. cast byencode() - Error: no attributes for date fields. it is not possible to add attributes to date fields: it is not permitted by the RFCs. cast by
addAttribute()
π SEE ALSO π
this module is part of Mail-Message version 4.04, built on February 04, 2026. website: http://perl.overmeer.net/CPAN/
π LICENSE π
for contributors see file ChangeLog.
this software is copyright (c) 2001-2026 by Mark Overmeer.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page bestie π«Ά this one shipped as perl v5.42.0 on 2026-02-05, under the truncated header name Mail::M...d::Date(3) β she's iconic, she's a date field, and she will absolutely reformat your timestamps into something standard. periodt. πβ¨
π¦ where this page comes from
- fedora 44: perl-Mail-Message 4.04-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms