The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

NAME

HTML::Object::DOM::Element::Time - HTML Object DOM Time Class

SYNOPSIS

my $time = HTML::Object::DOM::Element::Time->new ||
die( HTML::Object::DOM::Element::Time->error, "\n" );

VERSION

v0.2.0

DESCRIPTION

This interface provides special properties (beyond the regular HTML::Object::DOM::Element interface it also has available to it by inheritance) for manipulating <time> elements.

INHERITANCE

+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +----------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Time |
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +----------------------------------+

PROPERTIES

Inherits properties from its parent HTML::Object::DOM::Element

dateTime

Is a string that reflects the datetime HTML attribute, containing a machine-readable form of the element's date and time value.

Example:

# Assumes there is <time id="t"> element in the HTML
my $t = $doc->getElementById( 't' );
$t->dateTime = "6w 5h 34m 5s";

See also Mozilla documentation

METHODS

Inherits methods from its parent HTML::Object::DOM::Element

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Mozilla documentation, Mozilla documentation on time element

COPYRIGHT & LICENSE

Copyright(c) 2022 DEGUEST Pte. Ltd.

All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.