NAME

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

VERSION

version 0.002

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.

start

DateTime object for slot start time.

end

DateTime object for slot end time.

from_hashref

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

Construct from API response hash with HH:MM strings or millisecond timestamps.

from_epoch_ms

my $slot = TimeSlot->from_epoch_ms($start_ms, $end_ms);

Construct from epoch milliseconds timestamps.

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

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-www-metaforge/issues.

IRC

You can reach Getty on irc.perl.org for questions and support.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

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.