#!/usr/bin/perl -w

use strict;
use DateTime;
use DateTime::Format::W3CDTF;
use DateTime::Format::Epoch::MJD;
use n8ur qw(round);

my $f = DateTime::Format::W3CDTF->new;
my $dt = $f->parse_datetime( $ARGV[0]);
my $dt_mjd = DateTime::Format::Epoch::MJD->new(
	unit => 'milliseconds',
	type => 'float'
	);
my $mjd = round(6,$dt_mjd->format_datetime($dt));

print $mjd,"\n";

exit 0;
