Exemple #1
0
 private static boolean hasNewVersion() {
   final String lastSVersion = Options.getString(Options.OPTION_LAST_VERSION);
   if (0 == lastSVersion.length()) {
     return false;
   }
   final int[] curVersion = getVersionDate("###DATE###");
   final int[] lastVersion = getVersionDate(lastSVersion);
   if (curVersion[2] < lastVersion[2]) return true;
   if (curVersion[2] > lastVersion[2]) return false;
   if (curVersion[1] < lastVersion[1]) return true;
   if (curVersion[1] > lastVersion[1]) return false;
   if (curVersion[0] < lastVersion[0]) return true;
   return false;
 }
Exemple #2
0
  // Returns String value of cost value
  public static String costToString(int value) {
    String costString = "";
    try {
      if (value != 0) {
        costString = Integer.toString(value / 100000);
        String afterDot = Integer.toString(value % 100000);
        while (afterDot.length() != 5) {
          afterDot = "0" + afterDot;
        }
        costString = costString + "." + afterDot.substring(0, 2);

      } else {
        costString = "0.00";
      }

    } catch (Exception e) {
      costString = "0.00";
    }
    return costString + Options.getString(Options.OPTION_CURRENCY);
  }