<URL: https://rt.cpan.org/Ticket/Display.html?id=91783 >
Le Mer 01 Jan 2014 23:00:22, lars.noo...@gmail.com a écrit : > On 01/01/2014 11:51 PM, Jean Forget via RT wrote: > > I have told about this problem in the 0.0503 announce message: > > http://grokbase.com/t/perl/datetime/13ajdqx1sq/announce-datetime- > > event-sunrise-0-0503-and-possible-evolution-for-0-0504 > > but I was warnocked. I prefer solution 1, that is, create a > > "sun_does_rise" method and a "sun_does_set" method. > > You will have to call these methods and check their > > return values before calling the usual method. > > > > Now, what I need is a few round tuits and code and release version > > 0.0504. > > In the meantime, you can apply the quick and dirty method you > > suggested. > > > > And by the way, happy new year Lars (and other rt.cpan.org users). > > > > Jean Forget > > > Thanks. And happy new year, too. > > The methods in solution #1 or #2 sound useful. They would solve > another > task that I normally have to work out in the code of the main program. > I Am Not An Astronomer, but maybe the method names could be > "polar_night" and "polar_day". That way it would not be so confusing > when they return true or false. > > Regards, > /Lars I finally gathered enough tuits to release the 0.0504 version. This version includes new methods "is_polar_day", "is_polar_night" and "is_day_and_night". You have also a new parameter for the "new" method: "silent", which suppresses the "never sets/rises" warnings.