Package java.text

Examples of java.text.SimpleDateFormat$CompiledField


      Instances header = new Instances(inst, 0);
      header.setClassIndex(classIndex);
      classificationOutput.setHeader(header);
      classificationOutput.setBuffer(outBuff);
    }
    String name = (new SimpleDateFormat("HH:mm:ss - ")).format(new Date());
    String cname = "";
          String cmd = "";
    Evaluation eval = null;
    try {
      if (m_CVBut.isSelected()) {
View Full Code Here


      m_Log.statusMessage("OK");
     
      if (classifier != null) {
  m_Log.logMessage("Loaded model from file '" + selected.getName()+ "'");
  String name = (new SimpleDateFormat("HH:mm:ss - ")).format(new Date());
  String cname = classifier.getClass().getName();
  if (cname.startsWith("weka.classifiers."))
    cname = cname.substring("weka.classifiers.".length());
  name += cname + " from file '" + selected.getName() + "'";
  StringBuffer outBuff = new StringBuffer();
View Full Code Here

       
        int prevIndex = formatIndex;
        for (int i = formatIndex; i < formats.length; i++, formatIndex++) {
            for (int j = 0; j < formats[i].length; j++) {
                try {
                    SimpleDateFormat dateFormatter = new SimpleDateFormat(formats[formatIndex][j], locale);
                    lastModified = dateFormatter.parse(lastModifiedStr);
                    if (lastModified.after(cal.getTime())) {
                        log.debug("Swapping to alternate format (found date in future)");
                        continue;
                    }
                    else // all ok, exit loop
View Full Code Here

   
    boolean notDate = true;
    if (m_dateAttributes.isInRange(i)) {
      // try to parse date string
      if (m_formatter == null) {
        m_formatter = new SimpleDateFormat(m_dateFormat);
      }
     
      try {
        long time = m_formatter.parse(ob.toString()).getTime();
        Double timeL = new Double(time);
View Full Code Here

  public String  getDisplayString()
  {   
    System.out.println("In display Pure Time ** member string-----------------****");
    if ( memberValue != null )
    {
      DateFormat   df= new SimpleDateFormat("h:mm a");
      return df.format(memberValue);
    }else
    {
      return "";
    }
  } 
View Full Code Here

      next.append("&selectedMonthName=" + nextWeekMonth + "&selectedYear=" + nextWeekYear + "');");

      calendarNavBarList.add(new DDNameValue("Previous", previous.toString()));
      calendarNavBarList.add(new DDNameValue("Current Week", current.toString()));
      calendarNavBarList.add(new DDNameValue("Next", next.toString()));
      SimpleDateFormat formatter = new SimpleDateFormat("MM/dd");

      String dailyGo = "c_goTo('/calendar.do?Type=DAILY";

      if (currentDay != 0 && currentMonth >= 0 && currentYear != 0) {
        Calendar headerCalendarWeek = Calendar.getInstance();
        headerCalendarWeek.set(currentYear, currentMonth, currentDay);

        int dayOfWeek = headerCalendarWeek.get(Calendar.DAY_OF_WEEK);
        // Subtracting it with 2 coz in the Calendar Starting Day is Monday.
        int offset = dayOfWeek - 2;
        if (offset < 0) {
          int daysInWeek = 7;
          // if we are before the current day of the week, we need to fall all
          // the way back to the previous beginning of the week. calculating our
          // offset in this way will give us the right num of days to the
          // previous start. this makes it easy to just add it to the
          // currentDate.
          offset = daysInWeek + offset;
        }
        int currentDate = headerCalendarWeek.get(Calendar.DATE);
        headerCalendarWeek.set(Calendar.DATE, currentDate - offset);

        int headerDayOfMonth = headerCalendarWeek.get(Calendar.DATE);
        int headerMonthOfYear = headerCalendarWeek.get(Calendar.MONTH);
        int headerYear = headerCalendarWeek.get(Calendar.YEAR);

        try {
          // This is used in the columnar weekly view for calculating the
          // date to be filled in when you click on a empty cell.
          calendarNavBarMap.put("startDayOfWeek", new Integer(headerDayOfMonth));
        } catch (NumberFormatException nfe) {
          logger.info("[setCalendarNavBar]: The offset for the clickable weekly view boxes will probably be broken.");
          calendarNavBarMap.put("startDayOfWeek", new Integer(0));
        }

        String dateString = headerYear + ",'" + getCalenderMonthName(headerMonthOfYear) + "'," + headerDayOfMonth;
        String headerDate = formatter.format(headerCalendarWeek.getTime());
        String dailyDate = "&selectedDay=" + headerDayOfMonth + "&selectedMonthName=" + getCalenderMonthName(headerMonthOfYear) + "&selectedYear="
            + headerYear;

        String action = "ScheduleActivity(" + dateString + ",'','');";
        dateList.put(String.valueOf(0), action);
        headerLinkList.put(String.valueOf(0), dailyGo + dailyDate + "');");
        headerList.put(String.valueOf(0), headerDate);
        int count = 1;
        for (int i = 0; i < 6; i++) {
          headerCalendarWeek.add(Calendar.DATE, 1);
          headerDayOfMonth = headerCalendarWeek.get(Calendar.DAY_OF_MONTH);
          headerMonthOfYear = headerCalendarWeek.get(Calendar.MONTH);
          headerYear = headerCalendarWeek.get(Calendar.YEAR);
          dateString = headerYear + ",'" + getCalenderMonthName(headerMonthOfYear) + "'," + headerDayOfMonth;
          action = "ScheduleActivity(" + dateString + ",'','');";
          dateList.put(String.valueOf(count), action);
          headerDate = formatter.format(headerCalendarWeek.getTime());
          headerList.put(String.valueOf(count), headerDate);
          dailyDate = "&selectedDay=" + headerDayOfMonth + "&selectedMonthName=" + getCalenderMonthName(headerMonthOfYear) + "&selectedYear="
              + headerYear;
          headerLinkList.put(String.valueOf(count), dailyGo + dailyDate + "');");
          count++;
View Full Code Here

        // When you set the applyDate to false then
        // it will only display the Date and it will not consider the Time
        if (applyDate)
        {
          df = new SimpleDateFormat(this.getDateFormat());
        }else{
          df = new SimpleDateFormat(this.onlyDateFormat);
        }
        return df.format(this.memberValue);
      }else{
        // if this is a timestamp, then just return a string representation
        return(memberValue.toString());
View Full Code Here

        int newFileID = -1;

        // somehow create a file using CvFileFacade, and get a CvFileVO from
        // that.
        CvFileVO fileVO = new CvFileVO();
        SimpleDateFormat df = new SimpleDateFormat("MMMM_dd_yyyy_hh_mm_ss_S");
        String prependDate = df.format(new Date());
        fileVO.setName("OriginalMessage_#" + messageID.intValue() + "_" + prependDate + ".html");
        fileVO.setTitle("OriginalMessage_#" + messageID.intValue());
        fileVO.setDescription("");
        fileVO.setFileSize(0.0f); // float
        fileVO.setVersion("1.0");
View Full Code Here

      noteForm.setTitle(noteVO.getTitle());
      noteForm.setDetail(noteVO.getDetail());
      noteForm.setCreatedid(String.valueOf(noteVO.getCreatedBy()));
      noteForm.setCreatedby(noteVO.getCreatedByVO().getFirstName() + " " + noteVO.getCreatedByVO().getLastName());

      DateFormat df = new SimpleDateFormat("MMM-dd-yyyy hh:mm:ss a");
      Timestamp createdTimestamp = noteVO.getCreatedOn();
      String createdDateString = "";
      if (createdTimestamp != null) {
        Date valueDate = new Date(createdTimestamp.getTime());
        createdDateString = df.format(valueDate);
      }
      noteForm.setCreateddate(createdDateString);

      Timestamp modifiedTimestamp = noteVO.getModifiedOn();
      String modyfiedDateString = "";
      if (modifiedTimestamp != null) {
        Date valueDate = new Date(modifiedTimestamp.getTime());
        modyfiedDateString = df.format(valueDate);
      }
      noteForm.setModifieddate(modyfiedDateString);

      if (noteVO.getRelateEntity() > 0) {
        noteForm.setEntityid(String.valueOf(noteVO.getRelateEntity()));
View Full Code Here

        CvFileVO flvo = new CvFileVO();
        flvo.setTitle(fileName); //file name

        Calendar c = Calendar.getInstance();
        java.util.Date dt = c.getTime();
        DateFormat df = new SimpleDateFormat("MM_dd_yyyy_hh_mm_ss");
        String dateStamp = df.format(dt);

        flvo.setName("attachment_" + dateStamp +"_"+ fileName);
        flvo.setCreatedBy(userid);
        flvo.setOwner(userid);
        flvo.setAuthorId(userid);
View Full Code Here

TOP

Related Classes of java.text.SimpleDateFormat$CompiledField

Copyright © 2018 www.massapicom. 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.