diff --git a/buildnum.properties b/buildnum.properties index 2e54031..92d794e 100644 --- a/buildnum.properties +++ b/buildnum.properties @@ -1,3 +1,3 @@ #ANT Task: ch.oscg.jreleaseinfo.BuildNumberHandler -#Fri Jun 02 16:51:45 PDT 2006 -build.num.last=63 +#Mon Apr 16 15:39:07 GMT 2007 +build.num.last=68 diff --git a/mobibot.iml b/mobibot.iml index 691ea12..b2c00bb 100644 --- a/mobibot.iml +++ b/mobibot.iml @@ -1,7 +1,7 @@ - + diff --git a/mobibot.ipr b/mobibot.ipr index 2c8ea91..e7307d9 100644 --- a/mobibot.ipr +++ b/mobibot.ipr @@ -50,13 +50,19 @@ + + + + + + + + @@ -89,6 +109,279 @@ + + + @@ -120,6 +414,12 @@ + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + @@ -253,6 +570,7 @@ + + + + + + diff --git a/mobibot.iws b/mobibot.iws index 2b5eb06..2078d14 100644 --- a/mobibot.iws +++ b/mobibot.iws @@ -16,6 +16,18 @@ + + + + + + + + + + + + @@ -27,7 +39,10 @@ + + + + + - + - - - - + + + + + + + + + + + @@ -148,7 +174,7 @@ - + @@ -157,7 +183,7 @@ - + @@ -166,7 +192,7 @@ - + @@ -186,16 +212,18 @@ - @@ -206,45 +234,40 @@ - - - - - - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -291,101 +310,45 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - + @@ -399,11 +362,11 @@ - + - + @@ -465,44 +428,18 @@ - - - - - - - - + + - + + + - + + + + + + - + + + + + + + + + @@ -560,6 +540,8 @@ @@ -567,6 +549,21 @@ + + + @@ -594,39 +595,45 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -637,14 +644,16 @@ + + + + + + + @@ -752,40 +774,38 @@ - + - - - - - - - - + - + + + + + + + + - + - + - - - - + + @@ -833,5 +853,9 @@ + + + + diff --git a/src/net/thauvin/erik/mobibot/ReleaseInfo.java b/src/net/thauvin/erik/mobibot/ReleaseInfo.java index 1d5a59d..8d43e1f 100644 --- a/src/net/thauvin/erik/mobibot/ReleaseInfo.java +++ b/src/net/thauvin/erik/mobibot/ReleaseInfo.java @@ -1,5 +1,5 @@ /* Created by JReleaseInfo AntTask from Open Source Competence Group */ -/* Creation date Fri Jun 02 16:51:45 PDT 2006 */ +/* Creation date Mon Apr 16 15:39:07 GMT 2007 */ package net.thauvin.erik.mobibot; import java.util.Date; @@ -20,21 +20,21 @@ public class ReleaseInfo { } - /** buildDate (set during build process to 1149292305593L). */ - private static final Date buildDate = new Date(1149292305593L); + /** buildDate (set during build process to 1176737947817L). */ + private static final Date buildDate = new Date(1176737947817L); /** - * Get buildDate (set during build process to Fri Jun 02 16:51:45 PDT 2006). + * Get buildDate (set during build process to Mon Apr 16 15:39:07 GMT 2007). * @return Date buildDate */ public static Date getBuildDate() { return buildDate; } /** - * Get buildNumber (set during build process to 63). + * Get buildNumber (set during build process to 68). * @return int buildNumber */ - public static int getBuildNumber() { return 63; } + public static int getBuildNumber() { return 68; } /** version (set during build process to "0.3"). */ diff --git a/src/net/thauvin/erik/mobibot/Weather.java b/src/net/thauvin/erik/mobibot/Weather.java index 35d1807..78f25d8 100644 --- a/src/net/thauvin/erik/mobibot/Weather.java +++ b/src/net/thauvin/erik/mobibot/Weather.java @@ -40,15 +40,15 @@ import net.sf.jweather.metar.Metar; import net.sf.jweather.metar.SkyCondition; import net.sf.jweather.metar.WeatherCondition; +import java.text.DecimalFormat; +import java.util.Date; import java.util.Iterator; - /** * Fetches the weather data from a specific station ID. * * @author Erik C. Thauvin * @version $Revision$, $Date$ - * * @created Feb 7, 2004 * @since 1.0 */ @@ -59,6 +59,11 @@ public class Weather implements Runnable */ public static final String STATIONS_URL = "http://www.rap.ucar.edu/weather/surface/stations.txt"; + /** + * The decimal number format. + */ + private static final DecimalFormat NUMBER_FORMAT = new DecimalFormat("0.##"); + /** * The bot. */ @@ -110,12 +115,18 @@ public class Weather implements Runnable _bot.send(_sender, "Station ID: " + metar.getStationID(), _isPrivate); + _bot.send(_sender, + "At: " + metar.getDateString() + " UTC (" + + (((new Date()).getTime() - metar.getDate().getTime()) / 1000L / 60L) + " minutes ago)", + _isPrivate); + result = metar.getWindSpeedInMPH(); if (result != null) { - _bot.send(_sender, "Wind Speed: " + result + " mph, " + metar.getWindSpeedInKnots() + " knots", - _isPrivate); + _bot.send(_sender, + "Wind Speed: " + result + " mph, " + metar.getWindSpeedInKnots() + " knots", + _isPrivate); } result = metar.getVisibility(); @@ -124,11 +135,11 @@ public class Weather implements Runnable { if (!metar.getVisibilityLessThan()) { - _bot.send(_sender, "Visibility: " + result + " mile(s)", _isPrivate); + _bot.send(_sender, "Visibility: " + NUMBER_FORMAT.format(result) + " mile(s)", _isPrivate); } else { - _bot.send(_sender, "Visibility: < " + result + " mile(s)", _isPrivate); + _bot.send(_sender, "Visibility: < " + NUMBER_FORMAT.format(result) + " mile(s)", _isPrivate); } } @@ -143,8 +154,9 @@ public class Weather implements Runnable if (result != null) { - _bot.send(_sender, "Temperature: " + result + " C, " + metar.getTemperatureInFahrenheit() + " F", - _isPrivate); + _bot.send(_sender, + "Temperature: " + result + " C, " + metar.getTemperatureInFahrenheit() + " F", + _isPrivate); } if (metar.getWeatherConditions() != null)