RELEASED: IVWeather.class.php Version 1.10

Announcements of open source software, tools, libraries, freeware, and other projects.
Post Reply
Giz
Site Admin
Posts: 57
Joined: Wed May 07, 2003 6:19 pm

RELEASED: IVWeather.class.php Version 1.10

Post by Giz »

This release addressed 3 areas:

-Error handling (much improved)
-Parsing of dates and allowing display of date and datetime relative to localized preference
-support for localization files and functions to display the $ivw->sky description and winddecode() in languages other than english. IVWeather.class.php 1.10 now in fact supports any number of these localization files. I currently provide an english and spanish version, although the spanish language version is provided only as an example, and was translated using babelfish. :roll:
-In order to support the possibility a site using the class may choose to have any number of localization files, the script has been altered so that the class and language files may be safely moved to a subdirectory seperate from the calling script(s).

Comments from released scripts:
/************************************************************************/
// Version 1.10
// -Added version class variable to identify IVWeather class version
// -Fixed error handling to set $err and $errmsg, improved error handling
// ---Bad or invalid url's should now set $err and $errmsg
// -Added experimental timeout handling
// -Modified fopen() to include binary mode (rb)
// -Added "Calm" to getWinddecode
// -Created rDate[] for Date manipulation of IVWeather date.
// ----These Functions do not require localization file(s) ----------------
// -Added member function getDateStr() -returns local Server Date/Time
// -Added member function SetLocalDateTimeFormat($sDTFmt) -override to set DateTime Format
// -Added member function getLocalDateStr() -returns local Server Date/Time String
// -Added member function SetLocalFCDateFormat($sDFmt) -Sets Format for Forecast Dates
// -Added member function getLocalFCDateStr($date) -For formats other than mm/dd/yyyy
// ------------------------------------------------------------------------
// Translations provided by IVWeather.lang files.
// -Added support for localized string files
// ---Added getLocalWinddecode(language);
// ---Added getLocalWinddecode(language);
// ---Added getLocalSkybyWid(language);
// ---Added getLocalSky(language); [returns today's Sky, locally translated]
/************************************************************************/

/*****************
//Quickstart
//*****************
/* Your code should begin with this block. You can pass a url variable like $uvw or a literal string.
* For backwards compatibility with version 1.0 of the class, you can omit use of the localization block
* if you don't need that support.

Code: Select all

$ivw = new IVWeather($uvw);
if (!$ivw->err) {
	if ($localized)
		$ivw->loadLocalization($rlangwd, $rlangsky);
	* Your code here *
}
*/ 
Latest release here: http://www.gizmola.com/blog/index.php?s ... t=5&file=6

Thanks to those who provided valuable feedback and suggestions for improvements on this forum!
Post Reply