NAME

WWW::MetaForge::ArcRaiders::Result::EventTimer::TimeSlot - A time slot with start and end DateTime objects

VERSION

version 0.001

SYNOPSIS

my $slot = WWW::MetaForge::ArcRaiders::Result::EventTimer::TimeSlot->from_hashref({
  start => '14:00',
  end   => '15:00',
});

say $slot->start;  # DateTime object
say $slot->end;    # DateTime object

if ($slot->contains) {
  say "Event is active now!";
}

DESCRIPTION

Represents a scheduled time slot with DateTime objects for start and end times. All times are in UTC.

ATTRIBUTES

start

DateTime object for slot start time.

end

DateTime object for slot end time.

METHODS

from_hashref

my $slot = TimeSlot->from_hashref({ start => "HH:MM", end => "HH:MM" });

Construct from API response hash with HH:MM strings.

contains

if ($slot->contains) { ... }
if ($slot->contains($datetime)) { ... }

Returns true if the given DateTime (or now) is within this slot.

minutes_until_start

my $mins = $slot->minutes_until_start;

Returns minutes until this slot starts.

minutes_until_end

my $mins = $slot->minutes_until_end;

Returns minutes until this slot ends.

SUPPORT

Source Code

The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)

https://github.com/Getty/p5-www-metaforge

git clone https://github.com/Getty/p5-www-metaforge.git

AUTHOR

Torsten Raudssus <torsten@raudssus.de>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus.

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