1Mail::Message::Field::DUasteer(3C)ontributed Perl DocumeMnatialt:i:oMnessage::Field::Date(3)
2
3
4
6 Mail::Message::Field::Date - message header field with uris
7
9 Mail::Message::Field::Date
10 is a Mail::Message::Field::Structured
11 is a Mail::Message::Field::Full
12 is a Mail::Message::Field
13 is a Mail::Reporter
14
16 my $f = Mail::Message::Field->new(Date => time);
17
19 Dates are a little more tricky than it should be: the formatting
20 permits a few constructs more than other RFCs use for timestamps. For
21 instance, a small subset of timezone abbreviations are permitted.
22
23 The studied date field will reformat the content into a standard form.
24
25 Extends "DESCRIPTION" in Mail::Message::Field::Structured.
26
28 Extends "OVERLOADED" in Mail::Message::Field::Structured.
29
30 overload: ""
31 Inherited, see "OVERLOADED" in Mail::Message::Field
32
33 overload: 0+
34 Inherited, see "OVERLOADED" in Mail::Message::Field
35
36 overload: <=>
37 Inherited, see "OVERLOADED" in Mail::Message::Field
38
39 overload: bool
40 Inherited, see "OVERLOADED" in Mail::Message::Field
41
42 overload: cmp
43 Inherited, see "OVERLOADED" in Mail::Message::Field
44
45 overload: stringification
46 Inherited, see "OVERLOADED" in Mail::Message::Field::Full
47
49 Extends "METHODS" in Mail::Message::Field::Structured.
50
51 Constructors
52 Extends "Constructors" in Mail::Message::Field::Structured.
53
54 $obj->clone()
55 Inherited, see "Constructors" in Mail::Message::Field
56
57 Mail::Message::Field::Date->from($field, %options)
58 Inherited, see "Constructors" in Mail::Message::Field::Full
59
60 Mail::Message::Field::Date->new($data)
61 -Option --Defined in --Default
62 attributes Mail::Message::Field::Structured <ignored>
63 charset Mail::Message::Field::Full undef
64 datum Mail::Message::Field::Structured undef
65 encoding Mail::Message::Field::Full 'q'
66 force Mail::Message::Field::Full false
67 language Mail::Message::Field::Full undef
68 log Mail::Reporter 'WARNINGS'
69 trace Mail::Reporter 'WARNINGS'
70
71 attributes => ATTRS
72 charset => STRING
73 datum => STRING
74 encoding => 'q'|'Q'|'b'|'B'
75 force => BOOLEAN
76 language => STRING
77 log => LEVEL
78 trace => LEVEL
79
80 example:
81
82 my $mmfd = 'Mail::Message::Field::Date';
83 my $f = $mmfd->new(Date => time);
84
85 The field
86 Extends "The field" in Mail::Message::Field::Structured.
87
88 $obj->isStructured()
89 Mail::Message::Field::Date->isStructured()
90 Inherited, see "The field" in Mail::Message::Field
91
92 $obj->length()
93 Inherited, see "The field" in Mail::Message::Field
94
95 $obj->nrLines()
96 Inherited, see "The field" in Mail::Message::Field
97
98 $obj->print( [$fh] )
99 Inherited, see "The field" in Mail::Message::Field
100
101 $obj->size()
102 Inherited, see "The field" in Mail::Message::Field
103
104 $obj->string( [$wrap] )
105 Inherited, see "The field" in Mail::Message::Field
106
107 $obj->toDisclose()
108 Inherited, see "The field" in Mail::Message::Field
109
110 Access to the name
111 Extends "Access to the name" in Mail::Message::Field::Structured.
112
113 $obj->Name()
114 Inherited, see "Access to the name" in Mail::Message::Field
115
116 $obj->name()
117 Inherited, see "Access to the name" in Mail::Message::Field
118
119 $obj->wellformedName( [STRING] )
120 Inherited, see "Access to the name" in Mail::Message::Field
121
122 Access to the body
123 Extends "Access to the body" in Mail::Message::Field::Structured.
124
125 $obj->body()
126 Inherited, see "Access to the body" in Mail::Message::Field
127
128 $obj->decodedBody(%options)
129 Inherited, see "Access to the body" in Mail::Message::Field::Full
130
131 $obj->folded()
132 Inherited, see "Access to the body" in Mail::Message::Field
133
134 $obj->foldedBody( [$body] )
135 Inherited, see "Access to the body" in Mail::Message::Field
136
137 $obj->stripCFWS( [STRING] )
138 Mail::Message::Field::Date->stripCFWS( [STRING] )
139 Inherited, see "Access to the body" in Mail::Message::Field
140
141 $obj->unfoldedBody( [$body, [$wrap]] )
142 Inherited, see "Access to the body" in Mail::Message::Field
143
144 Access to the content
145 Extends "Access to the content" in Mail::Message::Field::Structured.
146
147 $obj->addAttribute(...)
148 Attributes are not supported for date fields.
149
150 $obj->addresses()
151 Inherited, see "Access to the content" in Mail::Message::Field
152
153 $obj->attrPairs()
154 Inherited, see "Access to the content" in
155 Mail::Message::Field::Structured
156
157 $obj->attribute( $object|<STRING, %options>|<$name,$value,%options> )
158 Inherited, see "Access to the content" in
159 Mail::Message::Field::Structured
160
161 $obj->attributes()
162 Inherited, see "Access to the content" in
163 Mail::Message::Field::Structured
164
165 $obj->beautify()
166 Inherited, see "Access to the content" in
167 Mail::Message::Field::Full
168
169 $obj->comment( [STRING] )
170 Inherited, see "Access to the content" in Mail::Message::Field
171
172 $obj->createComment(STRING, %options)
173 Mail::Message::Field::Date->createComment(STRING, %options)
174 Inherited, see "Access to the content" in
175 Mail::Message::Field::Full
176
177 $obj->createPhrase(STRING, %options)
178 Mail::Message::Field::Date->createPhrase(STRING, %options)
179 Inherited, see "Access to the content" in
180 Mail::Message::Field::Full
181
182 $obj->study()
183 Inherited, see "Access to the content" in Mail::Message::Field
184
185 $obj->time()
186 Convert date into a timestamp, as produced with POSIX::time().
187
188 $obj->toDate( [$time] )
189 Mail::Message::Field::Date->toDate( [$time] )
190 Inherited, see "Access to the content" in Mail::Message::Field
191
192 $obj->toInt()
193 Inherited, see "Access to the content" in Mail::Message::Field
194
195 Other methods
196 Extends "Other methods" in Mail::Message::Field::Structured.
197
198 $obj->dateToTimestamp(STRING)
199 Mail::Message::Field::Date->dateToTimestamp(STRING)
200 Inherited, see "Other methods" in Mail::Message::Field
201
202 Internals
203 Extends "Internals" in Mail::Message::Field::Structured.
204
205 $obj->consume( $line | <$name,<$body|$objects>> )
206 Inherited, see "Internals" in Mail::Message::Field
207
208 $obj->decode(STRING, %options)
209 Mail::Message::Field::Date->decode(STRING, %options)
210 Inherited, see "Internals" in Mail::Message::Field::Full
211
212 $obj->defaultWrapLength( [$length] )
213 Inherited, see "Internals" in Mail::Message::Field
214
215 $obj->encode(STRING, %options)
216 Inherited, see "Internals" in Mail::Message::Field::Full
217
218 $obj->fold( $name, $body, [$maxchars] )
219 Mail::Message::Field::Date->fold( $name, $body, [$maxchars] )
220 Inherited, see "Internals" in Mail::Message::Field
221
222 $obj->setWrapLength( [$length] )
223 Inherited, see "Internals" in Mail::Message::Field
224
225 $obj->stringifyData(STRING|ARRAY|$objects)
226 Inherited, see "Internals" in Mail::Message::Field
227
228 $obj->unfold(STRING)
229 Inherited, see "Internals" in Mail::Message::Field
230
231 Parsing
232 Extends "Parsing" in Mail::Message::Field::Structured.
233
234 $obj->consumeComment(STRING)
235 Mail::Message::Field::Date->consumeComment(STRING)
236 Inherited, see "Parsing" in Mail::Message::Field::Full
237
238 $obj->consumeDotAtom(STRING)
239 Inherited, see "Parsing" in Mail::Message::Field::Full
240
241 $obj->consumePhrase(STRING)
242 Mail::Message::Field::Date->consumePhrase(STRING)
243 Inherited, see "Parsing" in Mail::Message::Field::Full
244
245 $obj->datum( [$value] )
246 Inherited, see "Parsing" in Mail::Message::Field::Structured
247
248 $obj->parse(STRING)
249 Inherited, see "Parsing" in Mail::Message::Field::Full
250
251 $obj->produceBody()
252 Inherited, see "Parsing" in Mail::Message::Field::Full
253
254 Error handling
255 Extends "Error handling" in Mail::Message::Field::Structured.
256
257 $obj->AUTOLOAD()
258 Inherited, see "Error handling" in Mail::Reporter
259
260 $obj->addReport($object)
261 Inherited, see "Error handling" in Mail::Reporter
262
263 $obj->defaultTrace( [$level]|[$loglevel, $tracelevel]|[$level,
264 $callback] )
265 Mail::Message::Field::Date->defaultTrace( [$level]|[$loglevel,
266 $tracelevel]|[$level, $callback] )
267 Inherited, see "Error handling" in Mail::Reporter
268
269 $obj->errors()
270 Inherited, see "Error handling" in Mail::Reporter
271
272 $obj->log( [$level, [$strings]] )
273 Mail::Message::Field::Date->log( [$level, [$strings]] )
274 Inherited, see "Error handling" in Mail::Reporter
275
276 $obj->logPriority($level)
277 Mail::Message::Field::Date->logPriority($level)
278 Inherited, see "Error handling" in Mail::Reporter
279
280 $obj->logSettings()
281 Inherited, see "Error handling" in Mail::Reporter
282
283 $obj->notImplemented()
284 Inherited, see "Error handling" in Mail::Reporter
285
286 $obj->report( [$level] )
287 Inherited, see "Error handling" in Mail::Reporter
288
289 $obj->reportAll( [$level] )
290 Inherited, see "Error handling" in Mail::Reporter
291
292 $obj->trace( [$level] )
293 Inherited, see "Error handling" in Mail::Reporter
294
295 $obj->warnings()
296 Inherited, see "Error handling" in Mail::Reporter
297
298 Cleanup
299 Extends "Cleanup" in Mail::Message::Field::Structured.
300
301 $obj->DESTROY()
302 Inherited, see "Cleanup" in Mail::Reporter
303
305 Extends "DETAILS" in Mail::Message::Field::Structured.
306
308 Warning: Field content is not numerical: $content
309 The numeric value of a field is requested (for instance the "Lines"
310 or "Content-Length" fields should be numerical), however the data
311 contains weird characters.
312
313 Warning: Illegal character in charset '$charset'
314 The field is created with an utf8 string which only contains data
315 from the specified character set. However, that character set can
316 never be a valid name because it contains characters which are not
317 permitted.
318
319 Warning: Illegal character in field name $name
320 A new field is being created which does contain characters not
321 permitted by the RFCs. Using this field in messages may break
322 other e-mail clients or transfer agents, and therefore mutulate or
323 extinguish your message.
324
325 Warning: Illegal character in language '$lang'
326 The field is created with data which is specified to be in a
327 certain language, however, the name of the language cannot be
328 valid: it contains characters which are not permitted by the RFCs.
329
330 Warning: Illegal encoding '$encoding', used 'q'
331 The RFCs only permit base64 ("b " or "B ") or quoted-printable ("q"
332 or "Q") encoding. Other than these four options are illegal.
333
334 Error: No attributes for date fields.
335 It is not possible to add attributes to date fields: it is not
336 permitted by the RFCs.
337
338 Error: Package $package does not implement $method.
339 Fatal error: the specific package (or one of its superclasses) does
340 not implement this method where it should. This message means that
341 some other related classes do implement this method however the
342 class at hand does not. Probably you should investigate this and
343 probably inform the author of the package.
344
346 This module is part of Mail-Message distribution version 3.012, built
347 on February 11, 2022. Website: http://perl.overmeer.net/CPAN/
348
350 Copyrights 2001-2022 by [Mark Overmeer <markov@cpan.org>]. For other
351 contributors see ChangeLog.
352
353 This program is free software; you can redistribute it and/or modify it
354 under the same terms as Perl itself. See http://dev.perl.org/licenses/
355
356
357
358perl v5.36.0 2023-01-20 Mail::Message::Field::Date(3)