Ticket #3337: Forecast.php

File Forecast.php, 856 bytes (added by maverik044, 17 years ago)

Support script. Same as patched version to Ticket#3303

Line 
1<?php
2/**
3 * Forecast class for MythWeb's Weather module
4 *
5 * @url         $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/weather/includes/objects/Forecast.php $
6 * @date        $Date: 2006-12-19 03:17:33 -0500 (Tue, 19 Dec 2006) $
7 * @version     $Revision: 12295 $
8 * @author      $Author: xris $
9 * @license     GPL
10 *
11 * @package     MythWeb
12 * @subpackage  Weather
13 *
14/**/
15
16class Forecast {
17
18    var $date;
19    var $dayofweek;
20
21    var $DescImage;
22    var $DescText;
23
24    var $HighTemperature;
25    var $LowTemperature;
26
27    function Forecast($date,$d) {
28        $i = strpos($date, "/");
29        $j = strpos($date, "/", $i+1);
30        $month = substr($date,0,$i);
31        $day   = substr($date,$i+1,$j-$i-1);
32        $year  = substr($date,$j+1,2);
33
34        $this->date = date('m/d/Y', mktime(0,0,0,$month,$day+$d,$year));
35    }
36}