{
    "mode": "perldoc",
    "parameter": "Mail::Message::Field::Date",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Mail%3A%3AMessage%3A%3AField%3A%3ADate/json",
    "generated": "2026-06-09T14:10:04Z",
    "synopsis": "my $f = Mail::Message::Field->new(Date => time);",
    "sections": {
        "NAME": {
            "content": "Mail::Message::Field::Date - message header field with uris\n",
            "subsections": []
        },
        "INHERITANCE": {
            "content": "Mail::Message::Field::Date\nis a Mail::Message::Field::Structured\nis a Mail::Message::Field::Full\nis a Mail::Message::Field\nis a Mail::Reporter\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "my $f = Mail::Message::Field->new(Date => time);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Dates are a little more tricky than it should be: the formatting permits a few constructs more\nthan other RFCs use for timestamps. For instance, a small subset of timezone abbreviations are\npermitted.\n\nThe studied date field will reformat the content into a standard form.\n\nExtends \"DESCRIPTION\" in Mail::Message::Field::Structured.\n",
            "subsections": []
        },
        "OVERLOADED": {
            "content": "Extends \"OVERLOADED\" in Mail::Message::Field::Structured.\n\noverload: \"\"\nInherited, see \"OVERLOADED\" in Mail::Message::Field\n\noverload: 0+\nInherited, see \"OVERLOADED\" in Mail::Message::Field\n\noverload: <=>\nInherited, see \"OVERLOADED\" in Mail::Message::Field\n\noverload: bool\nInherited, see \"OVERLOADED\" in Mail::Message::Field\n\noverload: cmp\nInherited, see \"OVERLOADED\" in Mail::Message::Field\n\noverload: stringification\nInherited, see \"OVERLOADED\" in Mail::Message::Field::Full\n",
            "subsections": []
        },
        "METHODS": {
            "content": "Extends \"METHODS\" in Mail::Message::Field::Structured.\n",
            "subsections": [
                {
                    "name": "Constructors",
                    "content": "Extends \"Constructors\" in Mail::Message::Field::Structured.\n\n$obj->clone()\nInherited, see \"Constructors\" in Mail::Message::Field\n\nMail::Message::Field::Date->from($field, %options)\nInherited, see \"Constructors\" in Mail::Message::Field::Full\n\nMail::Message::Field::Date->new($data)\n-Option    --Defined in                      --Default\nattributes  Mail::Message::Field::Structured  <ignored>\ncharset     Mail::Message::Field::Full        undef\ndatum       Mail::Message::Field::Structured  undef\nencoding    Mail::Message::Field::Full        'q'\nforce       Mail::Message::Field::Full        false\nlanguage    Mail::Message::Field::Full        undef\nlog         Mail::Reporter                    'WARNINGS'\ntrace       Mail::Reporter                    'WARNINGS'\n\nattributes => ATTRS\ncharset => STRING\ndatum => STRING\nencoding => 'q'|'Q'|'b'|'B'\nforce => BOOLEAN\nlanguage => STRING\nlog => LEVEL\ntrace => LEVEL\n\nexample:\n\nmy $mmfd = 'Mail::Message::Field::Date';\nmy $f = $mmfd->new(Date => time);\n"
                },
                {
                    "name": "The field",
                    "content": "Extends \"The field\" in Mail::Message::Field::Structured.\n\n$obj->isStructured()\nMail::Message::Field::Date->isStructured()\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->length()\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->nrLines()\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->print( [$fh] )\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->size()\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->string( [$wrap] )\nInherited, see \"The field\" in Mail::Message::Field\n\n$obj->toDisclose()\nInherited, see \"The field\" in Mail::Message::Field\n"
                },
                {
                    "name": "Access to the name",
                    "content": "Extends \"Access to the name\" in Mail::Message::Field::Structured.\n\n$obj->Name()\nInherited, see \"Access to the name\" in Mail::Message::Field\n\n$obj->name()\nInherited, see \"Access to the name\" in Mail::Message::Field\n\n$obj->wellformedName( [STRING] )\nInherited, see \"Access to the name\" in Mail::Message::Field\n"
                },
                {
                    "name": "Access to the body",
                    "content": "Extends \"Access to the body\" in Mail::Message::Field::Structured.\n\n$obj->body()\nInherited, see \"Access to the body\" in Mail::Message::Field\n\n$obj->decodedBody(%options)\nInherited, see \"Access to the body\" in Mail::Message::Field::Full\n\n$obj->folded()\nInherited, see \"Access to the body\" in Mail::Message::Field\n\n$obj->foldedBody( [$body] )\nInherited, see \"Access to the body\" in Mail::Message::Field\n\n$obj->stripCFWS( [STRING] )\nMail::Message::Field::Date->stripCFWS( [STRING] )\nInherited, see \"Access to the body\" in Mail::Message::Field\n\n$obj->unfoldedBody( [$body, [$wrap]] )\nInherited, see \"Access to the body\" in Mail::Message::Field\n"
                },
                {
                    "name": "Access to the content",
                    "content": "Extends \"Access to the content\" in Mail::Message::Field::Structured.\n\n$obj->addAttribute(...)\nAttributes are not supported for date fields.\n\n$obj->addresses()\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->attrPairs()\nInherited, see \"Access to the content\" in Mail::Message::Field::Structured\n\n$obj->attribute( $object|<STRING, %options>|<$name,$value,%options> )\nInherited, see \"Access to the content\" in Mail::Message::Field::Structured\n\n$obj->attributes()\nInherited, see \"Access to the content\" in Mail::Message::Field::Structured\n\n$obj->beautify()\nInherited, see \"Access to the content\" in Mail::Message::Field::Full\n\n$obj->comment( [STRING] )\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->createComment(STRING, %options)\nMail::Message::Field::Date->createComment(STRING, %options)\nInherited, see \"Access to the content\" in Mail::Message::Field::Full\n\n$obj->createPhrase(STRING, %options)\nMail::Message::Field::Date->createPhrase(STRING, %options)\nInherited, see \"Access to the content\" in Mail::Message::Field::Full\n\n$obj->study()\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->time()\nConvert date into a timestamp, as produced with POSIX::time().\n\n$obj->toDate( [$time] )\nMail::Message::Field::Date->toDate( [$time] )\nInherited, see \"Access to the content\" in Mail::Message::Field\n\n$obj->toInt()\nInherited, see \"Access to the content\" in Mail::Message::Field\n"
                },
                {
                    "name": "Other methods",
                    "content": "Extends \"Other methods\" in Mail::Message::Field::Structured.\n\n$obj->dateToTimestamp(STRING)\nMail::Message::Field::Date->dateToTimestamp(STRING)\nInherited, see \"Other methods\" in Mail::Message::Field\n"
                },
                {
                    "name": "Internals",
                    "content": "Extends \"Internals\" in Mail::Message::Field::Structured.\n\n$obj->consume( $line | <$name,<$body|$objects>> )\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->decode(STRING, %options)\nMail::Message::Field::Date->decode(STRING, %options)\nInherited, see \"Internals\" in Mail::Message::Field::Full\n\n$obj->defaultWrapLength( [$length] )\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->encode(STRING, %options)\nInherited, see \"Internals\" in Mail::Message::Field::Full\n\n$obj->fold( $name, $body, [$maxchars] )\nMail::Message::Field::Date->fold( $name, $body, [$maxchars] )\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->setWrapLength( [$length] )\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->stringifyData(STRING|ARRAY|$objects)\nInherited, see \"Internals\" in Mail::Message::Field\n\n$obj->unfold(STRING)\nInherited, see \"Internals\" in Mail::Message::Field\n"
                },
                {
                    "name": "Parsing",
                    "content": "Extends \"Parsing\" in Mail::Message::Field::Structured.\n\n$obj->consumeComment(STRING)\nMail::Message::Field::Date->consumeComment(STRING)\nInherited, see \"Parsing\" in Mail::Message::Field::Full\n\n$obj->consumeDotAtom(STRING)\nInherited, see \"Parsing\" in Mail::Message::Field::Full\n\n$obj->consumePhrase(STRING)\nMail::Message::Field::Date->consumePhrase(STRING)\nInherited, see \"Parsing\" in Mail::Message::Field::Full\n\n$obj->datum( [$value] )\nInherited, see \"Parsing\" in Mail::Message::Field::Structured\n\n$obj->parse(STRING)\nInherited, see \"Parsing\" in Mail::Message::Field::Full\n\n$obj->produceBody()\nInherited, see \"Parsing\" in Mail::Message::Field::Full\n"
                },
                {
                    "name": "Error handling",
                    "content": "Extends \"Error handling\" in Mail::Message::Field::Structured.\n\n$obj->AUTOLOAD()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->addReport($object)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback] )\nMail::Message::Field::Date->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level, $callback]\n)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->errors()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->log( [$level, [$strings]] )\nMail::Message::Field::Date->log( [$level, [$strings]] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logPriority($level)\nMail::Message::Field::Date->logPriority($level)\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->logSettings()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->notImplemented()\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->report( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->reportAll( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->trace( [$level] )\nInherited, see \"Error handling\" in Mail::Reporter\n\n$obj->warnings()\nInherited, see \"Error handling\" in Mail::Reporter\n"
                },
                {
                    "name": "Cleanup",
                    "content": "Extends \"Cleanup\" in Mail::Message::Field::Structured.\n\n$obj->DESTROY()\nInherited, see \"Cleanup\" in Mail::Reporter\n"
                }
            ]
        },
        "DETAILS": {
            "content": "Extends \"DETAILS\" in Mail::Message::Field::Structured.\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "Warning: Field content is not numerical: $content\nThe numeric value of a field is requested (for instance the \"Lines\" or \"Content-Length\"\nfields should be numerical), however the data contains weird characters.\n\nWarning: Illegal character in charset '$charset'\nThe field is created with an utf8 string which only contains data from the specified\ncharacter set. However, that character set can never be a valid name because it contains\ncharacters which are not permitted.\n\nWarning: Illegal character in field name $name\nA new field is being created which does contain characters not permitted by the RFCs. Using\nthis field in messages may break other e-mail clients or transfer agents, and therefore\nmutulate or extinguish your message.\n\nWarning: Illegal character in language '$lang'\nThe field is created with data which is specified to be in a certain language, however, the\nname of the language cannot be valid: it contains characters which are not permitted by the\nRFCs.\n\nWarning: Illegal encoding '$encoding', used 'q'\nThe RFCs only permit base64 (\"b \" or \"B \") or quoted-printable (\"q\" or \"Q\") encoding. Other\nthan these four options are illegal.\n\nError: No attributes for date fields.\nIt is not possible to add attributes to date fields: it is not permitted by the RFCs.\n\nError: Package $package does not implement $method.\nFatal error: the specific package (or one of its superclasses) does not implement this\nmethod where it should. This message means that some other related classes do implement this\nmethod however the class at hand does not. Probably you should investigate this and probably\ninform the author of the package.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "This module is part of Mail-Message distribution version 3.012, built on February 11, 2022.\nWebsite: http://perl.overmeer.net/CPAN/\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself. See http://dev.perl.org/licenses/\n",
            "subsections": []
        }
    },
    "summary": "Mail::Message::Field::Date - message header field with uris",
    "flags": [],
    "examples": [],
    "see_also": []
}