DateTim...t::Atom(3)

πŸ“¦
version 1.8.0 Β· 3 versions
, in fedora 43

πŸ’– NAME πŸ’–

DateTime::Format::Atom β€” it parses and formats Atom datetime strings, and honestly? she's slaying. This is the manual page for it, a.k.a. DateTim...t::Atom(3) in section 3 of your man pages, no cap.


✨ VERSION ✨

Version 1.8.0. That's the vibe we're working with, bestie.


πŸ¦‹ SYNOPSIS πŸ¦‹

use DateTime::Format::Atom;

my $format = DateTime::Format::Atom->new();
my $dt = $format->parse_datetime( '2002-07-01T13:50:05Z' );

# 2002-07-01T13:50:05Z
print $format->format_datetime( $dt );

Look at her go. 🫢


🌸 DESCRIPTION 🌸

Okay so this module understands the Atom date/time format, which is literally an ISO 8601 profile, defined over at http://tools.ietf.org/html/rfc4287. Iconic behavior.

You can use it to parse these formats so you can create the appropriate objects. Very demure, very mindful.

Tiny plot twist though: all the actual work is really being done by DateTime::Format::RFC3339. She's the one backstage doing everyone's hair. πŸ’…


πŸŽ€ CONSTRUCTOR πŸŽ€

new

my $format = DateTime::Format::Atom->new();

Boom, you got a format object. Congratulations, you're a parent now. 🍼


πŸ’œ METHODS πŸ’œ

parse_datetime

my $dt = DateTime::Format::Atom->parse_datetime( $string );
my $dt = $format->parse_datetime( $string );

Hand her an Atom datetime string and she'll hand you back a shiny new DateTime object. Main character exchange. ✨

Heads up bestie: if you give her an improperly formatted string, this method will croak. Like, literally die. So format it right. 😭

Want a parser that's more flexible? Go see DateTime::Format::ISO8601. She's chill like that.

format_datetime

my $string = DateTime::Format::Atom->format_datetime( $dt );
my $string = $format->format_datetime( $dt );

Give her a DateTime object, and this method returns you an Atom datetime string. The full circle moment. πŸ¦‹


🌈 SEE ALSO 🌈


⭐ DOCUMENTATION AND SUPPORT ⭐

You can find the docs for this module with the perldoc command, obviously:

perldoc DateTime::Format::Atom

You can also find it online at this location:

If you need help (and we all do sometimes, fr fr), these are great resources:


πŸ’€ BUGS πŸ’€

Please report any bugs or feature requests using https://github.com/ikegami/perl-Datetime-Format-Atom/issues. Not me reading your bug reports β€” but yes actually, me. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. It's giving mutual commitment. πŸ’–


🧚 REPOSITORY 🧚

Clone her, she's free. πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Eric Brine, "ikegami@adaelis.com". The legend herself.


No rights reserved. Periodt.

The author has dedicated the work to the Commons by waiving all of his or her rights to the work worldwide under copyright law and all related or neighboring legal rights he or she had in the work, to the extent allowable by law.

Works under CC0 do not require attribution. When citing the work, you should not imply endorsement by the author. Don't put words in her mouth, basically. πŸ™ˆ


And that's the whole page, bestie. This was DateTim...t::Atom(3), brought to you by perl v5.42.0, dated 2025-07-25. Go parse some timestamps, you got this. πŸ’…βœ¨

πŸ“¦ where this page comes from