In module: DateTime
New method: extend()

Returns a DateTime::Span after the current date.
If the parameter is a date, returns the span between the two dates.
If the parameter is a duration, returns the span between the current
date and "date+duration".

  $dt_span = $dt_start->extend( until => $dt_end );

  $dt_span = $dt_start->extend( duration => $dt_duration );

  $dt_span = $dt_start->extend( hours => 24 );

Other names:

  span()
  to_span()

Implementation:

  calls DateTime::Span->new()

  "auto-uses" DateTime::Span


- Flavio S. Glock

Reply via email to