eigan / yr-php-library

Small php library for the norwegian weather service Yr.
18 stars 4 forks source link

Small mistakes #3

Closed rasamax closed 9 years ago

rasamax commented 9 years ago

Location.php:229

Change _!isint($to) to _!isint($from)

$from = is_null($from) || !is_int($from) ? time() : $from;

Location.php:233

Change $forecast->getFrom() to $forecast->getTo()

$forecast->getTo()->getTimestamp() <= $to) {
eigan commented 9 years ago

Thank you.

Dunno how I managed to write the one on line 229 :+1:

I think 233 is right though? As the documentation on the method says:

// @param  int        $to        unixtime for when the last forecast should start

So this means that a forecast should either start at the $to timestamp (is equal), or should be earlier (lower).