This file was automatically generated from http://svn.pugscode.org/pugs/misc/Date/lib/Duration/Gregorian.pod on Thu Jul 12 12:23:25 2007 GMT, revision 16992.
Duration::Gregorian - durations relative to the Gregorian Calendar
# note: normally you get a Duration::Gregorian like this:
use Date::Gregorian;
my $duration = date("2001") - "2000";
say $duration; # "2000/P1Y" - ISO-8601 duration format
# you can, however, explicitly create them like this:
use Duration::Gregorian;
my $duration = Duration::Gregorian.new("P1Y");# ISO-8601
$duration = duration "P3Y1M3DT6H2M4S"; # ISO-8601
$duration = duration "3Y 1M 3D 6h 2m 4s";
$duration = duration $secs; # secs
Duration::Gregorian represents durations against the Gregorian calendar as Perl 6 objects.
You can use the +, -, < and > operators as with
native perl data types to manipulate these values, as well as add them
to Date::Gregorian based objects.
Duration::Gregorian operations are divided into three broad categories: