Does anyone here use either the Astro::Sunrise or the 
DateTime::Event::Sunrise module?  I'm curious as to what the major differences 
are.

        From what I can see, Astro::Sunrise uses DateTime behind the scenes (if 
at all), so you don't need to enter that info yourself, making your script a 
little cleaner.

        However, DateTime::Event::Sunrise seems to offer more functions, e.g.:

# Is it day or night?
my $day_set = DateTime::SpanSet->from_sets( 
    start_set => $sunrise, end_set => $sunset );
print $day_set->contains( $dt ) ? 'day' : 'night';

which seems handy, but that can be mimicked.  

        The accuracy of both is only one minute apart, and they're both 
maintained by the same person, so I'm not really sure if there is a noticeable 
difference between the two.  These are the only sunrise/sunset modules I found 
on CPAN.

Frank
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to