Package java.text

Examples of java.text.Format.format()


            subMap.put("snapshot_time", ((Long) mapTimeFix.get("times").get(
                    "snapshot_time") - (getSnapshotDuration() * skipCount)));
            Format formatter = null;
            formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date date = new Date((Long) subMap.get("snapshot_time"));
            subMap.put("snapshot_date", formatter.format(date));

            // Add the submap back to the tempmap
            tempMap.put("times", new HashMap<String, Object>(subMap));

            // Clear out the subMap for use again
View Full Code Here


                            "times").get("snapshot_time")
                            - (getSnapshotDuration() * skipCount)));
                    Format formatter = null;
                    formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                    Date date = new Date((Long) subMap.get("snapshot_time"));
                    subMap.put("snapshot_date", formatter.format(date));
                    tempMap.put("times", new HashMap<String, Object>(subMap));
                    subMap.clear();
                    snapshotList.add(i,
                            new HashMap<String, HashMap<String, Object>>(
                                    tempMap));
View Full Code Here

        if (graph != null) {
            // get the current date
            Format formatter = null;
            formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date date = new Date(System.currentTimeMillis());
            String currentTime = formatter.format(date);
            // the graph was successfully operated on,
            // so update the last_seen attribute
            DBManager dbManager = new DBManager();
            Connection conn = dbManager.getConnection();
            Statement stmt = conn.createStatement();
View Full Code Here

  public String getCurrentDateAsString(FacesContext context,
      UICalendar calendar, Date date) throws IOException {

    Format formatter = new SimpleDateFormat("MM/yyyy");
    return formatter.format(date);
  }

  public String getCurrentDate(FacesContext context, UICalendar calendar,
      Date date) throws IOException {
    return ScriptUtils.toScript(formatDate(date));
View Full Code Here

                }
            }
        }

        if (format != null) {
            return format.format(value);
        } else {
            return value.toString();
        }
    }
View Full Code Here

            subMap.put("snapshot_time", ((Long) mapTimeFix.get("times").get(
                    "snapshot_time") - (getSnapshotDuration() * skipCount)));
            Format formatter = null;
            formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date date = new Date((Long) subMap.get("snapshot_time"));
            subMap.put("snapshot_date", formatter.format(date));

            // Add the submap back to the tempmap
            tempMap.put("times", new HashMap<String, Object>(subMap));

            // Clear out the subMap for use again
View Full Code Here

                            "times").get("snapshot_time")
                            - (getSnapshotDuration() * skipCount)));
                    Format formatter = null;
                    formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                    Date date = new Date((Long) subMap.get("snapshot_time"));
                    subMap.put("snapshot_date", formatter.format(date));
                    tempMap.put("times", new HashMap<String, Object>(subMap));
                    subMap.clear();
                    snapshotList.add(i,
                            new HashMap<String, HashMap<String, Object>>(
                                    tempMap));
View Full Code Here

            }
        }
        GraphJS += "graph" + graph.getId() + ".addAxis(\"x\", {labels: [";
        for (int i = 1; i < dataSet1.size(); i++) {
            Date date = new Date(snapshotTimes.get(i));
            GraphJS += "{value: " + (i) + ", text: '" + formatter.format(date);
            if ((i+1) != dataSet1.size())
                GraphJS += "' }, \n";
            else
              GraphJS += "' } \n";
        }
View Full Code Here

  public String getCurrentDateAsString(FacesContext context,
      UICalendar calendar, Date date) throws IOException {

    Format formatter = new SimpleDateFormat("MM/yyyy");
    return formatter.format(date);
  }

  public Object getCurrentDate(FacesContext context, UICalendar calendar,
      Date date) throws IOException {
    return formatDate(date);
View Full Code Here

  public String getCurrentDateAsString(FacesContext context,
      UICalendar calendar, Date date) throws IOException {

    Format formatter = new SimpleDateFormat("MM/yyyy");
    return formatter.format(date);
  }

  public String getCurrentDate(FacesContext context, UICalendar calendar,
      Date date) throws IOException {
    return ScriptUtils.toScript(formatDate(date));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.