JavaLikeCalc.JavaScript
isCurErr = (current == null);

curSymb_src = isCurErr ? "" : "weath"+current.symbol;

curTemp_arg0val = isCurErr ? 0 : current.t;

title_arg0val = isCurErr ? "-" : current.city;
title_arg1val = isCurErr ? "-" : current.country;

curText_arg0val = isCurErr ? "-" : SYS.strftime(SYS.strptimegm(current.sunRise,"%Y-%m-%dT%H:%M:%S"), "%H:%M");
curText_arg1val = isCurErr ? "-" : SYS.strftime(SYS.strptimegm(current.sunSet,"%Y-%m-%dT%H:%M:%S"), "%H:%M");
curText_arg8val = isCurErr ? "-" : SYS.strftime(SYS.strptimegm(current.tm,"%Y-%m-%dT%H:%M:%S"), "%a, %d-%b-%Y %H:%M");
curText_arg3val = isCurErr ? 0 : current.tFeel;
curText_arg4val = isCurErr ? 0 : current.h;
curText_arg6val = isCurErr ? 0 : current.windSpeed;
curText_arg7val = isCurErr ? "-" : current.windDir;
curText_arg2val = isCurErr ? 0 : current.windDirDeg;
curText_arg5val = isCurErr ? 0 : current.p.toInt()-1000;

isFCErr = (forecast == null);
for(iD = 1; iD <= 10; iD++) {
	fcO = forecast[iD-1];
	this["fcD"+iD+"Symb"].attrSet("src", isFCErr?"":"weath"+fcO.symbol);
	tipTool = tr("No data");
	if(!isFCErr) {
		tipTool = tr("On %1\n").replace("%1",SYS.strftime(SYS.strptimegm(fcO.tm,"%Y-%m-%d"),"%A, %d %B %Y"));
		tipTool += tr("Temperature (°С) %1, min %2, max %3, morning %4, evening %5, night %6\n")
								.replace("%1",fcO.t).replace("%2",fcO.tMin).replace("%3",fcO.tMax).replace("%4",fcO.tMorn).replace("%5",fcO.tEve).replace("%6",fcO.tNight);
		tipTool += tr("Wind %1(%4°), speed %2m/s, pressure %3mB\n")
								.replace("%1",fcO.windDir).replace("%2",fcO.windSpeed).replace("%3",(fcO.p.toInt()-1000).toString()).replace("%4",fcO.windDirDeg);
		tipTool += tr("Feel temperature (°С) %1, morning %2, evening %3, night %4\n")
								.replace("%1",fcO.tFeel).replace("%2",fcO.tFeelMorn).replace("%3",fcO.tFeelEve).replace("%4",fcO.tFeelNight);
		tipTool += tr("Humidity %1%\n").replace("%1",fcO.h);
		tipTool += tr("Sun rise %1, set %2\n").replace("%1",SYS.strftime(SYS.strptimegm(fcO.sunRise,"%Y-%m-%dT%H:%M:%S"),"%H:%M:%S"))
								.replace("%2",SYS.strftime(SYS.strptimegm(fcO.sunSet,"%Y-%m-%dT%H:%M:%S"),"%H:%M:%S"));

		for(iTm = 0; fcO.times != null && iTm < fcO.times.length; iTm++) {
			fcTmO = fcO.times[iTm];
			tipTool += tr("[%1-%2] %3 %4°C, feel %5°C; %6(%7°), %8m/s, %9mB; %A%\n").replace("%1",SYS.strftime(SYS.strptimegm(fcTmO.tmFrom,"%Y-%m-%dT%H:%M:%S"),"%H:%M"))
								.replace("%2",SYS.strftime(SYS.strptimegm(fcTmO.tmTo,"%Y-%m-%dT%H:%M:%S"),"%H:%M"))
								.replace("%3",fcTmO.symbolNm).replace("%4",fcTmO.t).replace("%5",fcTmO.tFeel)
								.replace("%6",fcTmO.windDir).replace("%7",fcTmO.windDirDeg).replace("%8",fcTmO.windSpeed).replace("%9",(fcTmO.p.toInt()-1000).toString())
								.replace("%A",fcTmO.h);

			//tipTool += tr("Temperature (°С) %1, min %2, max %3, feel %4\n")
			//					.replace("%1",fcTmO.t).replace("%2",fcTmO.tMin).replace("%3",fcTmO.tMax).replace("%4",fcTmO.tFeel);
			//tipTool += tr("Wind %1(%4°), speed %2m/s, pressure %3hPa\n")
			//					.replace("%1",fcTmO.windDir).replace("%2",fcTmO.windSpeed).replace("%3",fcTmO.p).replace("%4",fcTmO.windDirDeg);
			//tipTool += tr("Humidity %1%\n").replace("%1",fcTmO.h);
		}
	}
	this["fcD"+iD+"Symb"].attrSet("tipTool", tipTool);
	this["fcD"+iD+"Text"].attrSet("arg0val", isFCErr?0:fcO.tMax);
	this["fcD"+iD+"Text"].attrSet("arg1val", isFCErr?0:fcO.tMin);
}