afiskon/p6-datetime-format-w3cdtf/lib/DateTime/Format/W3CDTF

p6-datetime-format-w3cdtf src

NAME

DateTime::Format::W3CDTF - A Perl 6 module to deal with W3CDTF dates.

SYNOPSYS

use DateTime::Format::W3CDTF; my $w3c = DateTime::Format::W3CDTF.new; my DateTime $datetime = $w3c.parse('2012-09-04T11:22:33.5+04:00'); say $w3c.format($datetime);

DESCRIPTION

A Perl 6 module to deal with W3CDTF dates.

METHODS

(head2) parse(Str $date) of DateTime
Parses the string with W3C-formatted date and returns DateTime object. Throws an exception in case of errors.
(head2) format(DateTime $date) of String
Converts DateTime object to the W3C-formatted date string. Throws an exception in case of errors.

AUTHOR

Alexandr Alexeev, <eax at cpan.org> (L<http://eax.me/>)

COPYRIGHT

Copyright 2012 Alexandr Alexeev This program is free software; you can redistribute it and/or modify it under the same terms as Rakudo Perl 6 itself.

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: