---
name: "Weather::Com::DayPart"
section: "3pm"
platform: "linux"
package: "libweather-com-perl"
version: "0.5.3-2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/Weather::Com::DayPart"
---

# Weather::Com::DayPart(3pm)

Weather::Com::DayPart - class representing daytime or night part of a forecast

```
  [...]
```

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

```
  my $forecast = $locations[0]->forecast();
  my $tomorrow_night = $forecast->day(1)->night();
```

```
  print "Forecast for tomorrow night:\n";
  print " - conditions will be ", $tomorrow_night->conditions(), "\n";
  print " - humidity will be ", $tomorrow_night->humidity(), "\%\n";
  print " - wind speed will be ", $tomorrow_night->wind()->speed(), "km/h\n";
```

Via *Weather::Com::DayPart* objects one can access the daytime or night part of a *Weather::Com::DayForecast*. 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. You usually would not construct an object of this class yourself.  This is implicitely done when you call the `"day()"` or  `"night()"` method of a *Weather::Com::DayForecast* object.\
 **type(\[$language\])** Will return *day* or *night*. This attribute is *dynamic language enabled*.\
 **conditions(\[$language\])** Will return a textual description of the forecasted conditions. This attribute is *dynamic language enabled*.\
 *humidity()* Will return the humidity.\
 *icon()* Will return the icon number of the icon describing the forecasted weather.\
 *precipitation()* Will return the percentage chance of precipitation.\
 *wind()* Will return a *Weather::Com::Wind* object. Thomas Schnuecker, \<thomas@schnuecker.de\> 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 OO 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\>)!
