@@ -179,7 +179,7 @@ public function getWeather($query, $units = 'imperial', $lang = 'en', $appid = '
179
179
* @param string $units Can be either 'metric' or 'imperial' (default). This affects almost all units returned.
180
180
* @param string $lang The language to use for descriptions, default is 'en'. For possible values see below.
181
181
* @param string $appid Your app id, default ''. See http://openweathermap.org/appid for more details.
182
- * @param int $days For how much days you want to get a forecast. Default 1, maximum: 14 .
182
+ * @param int $days For how much days you want to get a forecast. Default 1, maximum: 16 .
183
183
*
184
184
* @throws OpenWeatherMap\Exception If OpenWeatherMap returns an error.
185
185
* @throws \InvalidArgumentException If an argument error occurs.
@@ -220,10 +220,10 @@ public function getWeatherForecast($query, $units = 'imperial', $lang = 'en', $a
220
220
221
221
if ($ days <= 5 ) {
222
222
$ answer = $ this ->getRawHourlyForecastData ($ query , $ units , $ lang , $ appid , 'xml ' );
223
- } else if ($ days <= 14 ) {
223
+ } else if ($ days <= 16 ) {
224
224
$ answer = $ this ->getRawDailyForecastData ($ query , $ units , $ lang , $ appid , 'xml ' , $ days );
225
225
} else {
226
- throw new \InvalidArgumentException ('Error: forecasts are only available for the next 14 days. $days must be lower than 15 . ' );
226
+ throw new \InvalidArgumentException ('Error: forecasts are only available for the next 16 days. $days must be lower than 17 . ' );
227
227
}
228
228
229
229
try {
@@ -407,9 +407,9 @@ public function getRawHourlyForecastData($query, $units = 'imperial', $lang = 'e
407
407
* @param string $lang The language to use for descriptions, default is 'en'. For possible values see below.
408
408
* @param string $appid Your app id, default ''. See http://openweathermap.org/appid for more details.
409
409
* @param string $mode The format of the data fetched. Possible values are 'json', 'html' and 'xml' (default)
410
- * @param int $cnt How many days of forecast shall be returned? Maximum (and default): 14
410
+ * @param int $cnt How many days of forecast shall be returned? Maximum (and default): 16
411
411
*
412
- * @throws \InvalidArgumentException If $cnt is higher than 14 .
412
+ * @throws \InvalidArgumentException If $cnt is higher than 16 .
413
413
* @return string Returns false on failure and the fetched data in the format you specified on success.
414
414
*
415
415
* Warning If an error occurred, OpenWeatherMap returns data in json format ALWAYS
@@ -440,10 +440,10 @@ public function getRawHourlyForecastData($query, $units = 'imperial', $lang = 'e
440
440
*
441
441
* @api
442
442
*/
443
- public function getRawDailyForecastData ($ query , $ units = 'imperial ' , $ lang = 'en ' , $ appid = '' , $ mode = 'xml ' , $ cnt = 14 )
443
+ public function getRawDailyForecastData ($ query , $ units = 'imperial ' , $ lang = 'en ' , $ appid = '' , $ mode = 'xml ' , $ cnt = 16 )
444
444
{
445
- if ($ cnt > 14 ) {
446
- throw new \InvalidArgumentException ('$cnt must be 14 or below! ' );
445
+ if ($ cnt > 16 ) {
446
+ throw new \InvalidArgumentException ('$cnt must be 16 or below! ' );
447
447
}
448
448
$ url = $ this ->buildUrl ($ query , $ units , $ lang , $ appid , $ mode , $ this ->weatherDailyForecastUrl ) . "&cnt= $ cnt " ;
449
449
0 commit comments