SYNOPSIS

  [...]

my @locations = $weather_finder->find('Heidelberg');

my $forecast = $locations[0]->forecast(); my $tomorrow = $forecast->day(1);

print "Forecast for tomorrow:\n"; print " - tomorrow it's the ", $tomorrow->date()->date(), "\n"; print " - sunrise will be at ", $tomorrow->sunrise()->time(), "\n"; print " - maximum temperature will be ", $tomorrow->high(), "\n";

DESCRIPTION

Via Weather::Com::DayForecast objects one can access the weather forecast for one specific day.

This class will not be updated automatically with each call to one of its methods. You need to call a method of your Weather::Com::Forecast object to get updated objects.

CONSTRUCTOR

You usually would not construct an object of this class yourself. This is implicitely done when you call the \*(C`day(number of day)\*(C' or the \*(C`all()\*(C' method of a Weather::Com::Forecast object.

METHODS

\$1

Returns a Weather::Com::DateTime object containing the date the forecast is for. Returns the maximum temperature that will be reached at daytime.

For day 0 (today), this will be 'N/A' when it's after noon...

There is a bug in weather.com's date and time mathematics: If you are asking for a location's forecast day 0 and it's short after midnight, day 0 will be \*(L"yesterday\*(R" and you'll get both, yesterday's daytime forecast and night forecast!

I have not investigated this issue further, yet. If anyone has, please inform me! Returns the minimum temperature that will be reached at night. Returns a Weather::Com::DateTime object containing the time of sunrise. Returns a Weather::Com::DateTime object containing the time of sunset. Returns a Weather::Com::DayPart object with all data belonging to the daytime.

For day 0 (today), this will be \*(C`undef\*(C' when it's after noon...

There is a bug in weather.com's date and time mathematics: If you are asking for a location's forecast day 0 and it's short after midnight, day 0 will be \*(L"yesterday\*(R" and you'll get both, yesterday's daytime forecast and night forecast!

I have not investigated this issue further, yet. If anyone has, please inform me! Returns a Weather::Com::DayPart object with all data belonging to the night.

AUTHOR

Thomas Schnuecker, <[email protected]>

COPYRIGHT AND LICENSE

Copyright (C) 2004-2007 by Thomas Schnuecker

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The data provided by weather.com and made accessible by this \s-1OO\s0 interface can be used for free under special terms. Please have a look at the application programming guide of weather.com (<http://www.weather.com/services/xmloap.html>)!