NAME

DateTime::Format::TauStation - Parse and format TauStation GCT datetimes

SYNOPSIS

  use DateTime::Format::TauStation;
  
  my $dt = DateTime::Format::TauStation->parse_datetime( '90.28/44:001 GCT' );
  
  # 90.28/44:001 GCT
  DateTime::Format::TauStation->format_datetime($dt);
  
  my $dur = DateTime::Format::TauStation->parse_duration( 'D/20:000 GCT' );
  
  # D/20:000 GCT
  DateTime::Format::TauStation->format_duration($dur);

DESCRIPTION

Parse and format GCT (Galactic Coordinated Time) strings for the online game TauStation.

METHODS

parse_datetime

Requires a full datetime string such as "0.1/02:003", where 0 is the cycle, 1 is the day, 03 is the segment, and 004 is the unit.

Returns a DateTime::TauStation object.

parse_duration

Supports the following forms of duration strings: D4.3/02:001 GCT, D3/02:001 GCT and D/02:001 GCT.

Returns a DateTime::TauStation object.

format_datetime

format_duration

format_interval

Given a DateTime::Duration::TauStation object, this method returns a GCT formatted duration string.

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::TauStation, DateTime::Duration::TauStation