NAME
DateTime::TauStation - Handle TauStation GCT datetimes
SYNOPSIS
use DateTime::TauStation;
my $dt = DateTime::TauStation->new(
cycle => '001',
day => '02',
segment => '03',
unit => '004',
);
print $dt->gct_cycle;
print $dt->gct_day;
print $dt->gct_segment;
print $dt->gct_unit;
Alternatively, combine with DateTime::Duration::TauStation and DateTime::Format::TauStation.
use DateTime::TauStation;
use DateTime::Format::TauStation;
my $dur = DateTime::Format::TauStation->parse_duration( 'D/20:000 GCT' );
my $dt = DateTime::TauStation->now->add_duration( $dur );
print DateTime::Format::TauStation->format_datetime($dt);
DESCRIPTION
DateTime subclass for GCT (Galactic Coordinated Time) datetimes for the online game TauStation.
METHODS
new
Accepts arguments:
- gct_cycle
- gct_day
- gct_segment
- gct_unit
catastrophe
Returns the datetime 000.00/00:000 GCT
, a.k.a. 1964-01-22T00:00:27.689615
UTC.
gct_cycle
Returns the cycle
part of the datetime.
gct_day
Returns the day
part of the datetime.
gct_segment
Returns the segment
part of the datetime.
gct_unit
Returns the unit
part of the datetime.
subtract_datetime
Returns a DateTime::Duration::TauStation object.
Limitations
Currently does not support negative GCT (pre-catastrophe) dates or negative durations.
AUTHOR
Carl Franks
COPYRIGHT
Copyright (c) 2018 Carl Franks.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
DateTime::Duration::TauStation, DateTime::Format::TauStation