HTML::O...t::Time(3)

πŸ“¦ version 0.6.0, in alpine 3.24

🌸 NAME 🌸

HTML::Object::DOM::Element::Time β€” HTML Object DOM Time Class. That's the name, bestie, and this is the HTML::O...t::Time(3) manual πŸ’–. Short, sweet, and all about the <time> element's DOM class. Slay.

✨ SYNOPSIS ✨

Okay so to load it up, you literally do this:

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

No cap, that's the whole entrance. 🫢

πŸ’– VERSION πŸ’–

v0.2.0 β€” that's the version, periodt. πŸ’…

πŸ¦‹ 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. It's giving very specific <time>-element main character energy, and honestly? Obsessed. ✨

πŸ‘‘ INHERITANCE πŸ‘‘

The ancestry is lowkey iconic β€” look at this chain:

+-----------------------+     +---------------------------+     +-------------------------+     +----------------------------+     +----------------------------------+
| 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, bestie.

⏰ dateTime ⏰

dateTime is a string that reflects the datetime HTML attribute, containing a machine-readable form of the element's date and time value. It's very "give me the data in a format the computer actually understands" of it. πŸ’–

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: https://developer.mozilla.org/en-US/docs/Web/API/HTMLTimeElement/dateTime πŸ¦‹

πŸ’… METHODS πŸ’…

Inherits methods from its parent HTML::Object::DOM::Element. Nothing extra here, just the inherited glow-up. ✨

🌈 AUTHOR 🌈

Jacques Deguest <jack@deguest.jp> β€” author, fr fr. πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯

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.

XOXO, your fave manual πŸ’… β€” source/version perl v5.42.2, date 2026-02-15. User Contributed Perl Documentation, out. 🫢

πŸ“¦ where this page comes from