Hill, Ronald wrote:
> 
> Hi All,
> 
> I have just updated the DateTime::Event::Sunrise package on
> CVS. I have added a new method sunrise_sunset (and a new method).
> 
> Basically, it will return a DateTime Span containing
> the rise/set times. Example:
[...]
> my $sunrise = DateTime::Event::Sunrise ->new(
>                  longitude =>'-118' ,
>                  latitude => '33',
> 
> );
> my $tmp = $sunrise->sunrise_sunset($dt);
> print "Sunrise is:" , $tmp->start->datetime , "\n";
> print "Sunset is:" , $tmp->end->datetime;
> 
> If I don't hear any complains I will release to CPAN
> next week as version 0.05.

Is this too verbose?

  my $dt_span = $sunrise->sunrise_sunset_span( datetime => $dt );
  print "Sunrise is:" , $dt_span->start->datetime , "\n";
  print "Sunset is:" ,  $dt_span->end->datetime;

  my $dt_set =  $sunrise->sunrise_set( %optional_parameters );
  my $dt_set2 = $sunrise->sunset_set( %optional_parameters );

  my $dt =  $sunrise->sunrise_dt( datetime => $dt );
  my $dt2 = $sunrise->sunset_dt( datetime => $dt );

- Flavio S. Glock

Reply via email to