Package java.text

Examples of java.text.SimpleDateFormat$CompiledField


     * @param value  the format string
     * @see    SimpleDateFormat
     */
    public void setFormat(String value) {
      try {
  m_Formatter = new SimpleDateFormat(value);
  m_Format    = value;
      }
      catch (Exception e) {
  m_Formatter = new SimpleDateFormat(DEFAULT_FORMAT);
  m_Format    = DEFAULT_FORMAT;
      }
    }
View Full Code Here


        url.append(contextPath);
        url.append("/html/photo/show.vm?sid=");
        url.append(pbean.getSite().getId());
        url.append("&pid=");
        url.append(pbean.getId());
        String curTime = new SimpleDateFormat("yyyy-MM-dd HH:mm")
            .format(new Date());
        StringBuffer img = new StringBuffer();
        img.append(urlPrefix);
        img.append(contextPath);
        img.append(pbean.getPreviewURL());
View Full Code Here

          url.append(rbean.getSite().getId());
          url.append("&log_id=");
          url.append(rbean.getDiary().getId());
          url.append("#");
          url.append(rbean.getId());
          String curTime = new SimpleDateFormat("yyyy-MM-dd HH:mm")
              .format(new Date());
          // �����ʼ�����
          String notify_content = MessageFormat.format(template,
              new String[]{rbean.getDiary().getOwner().getNickname(),
              rbean.getDiary().getTitle(), rbean.getAuthor(),
View Full Code Here

*/
   
    public boolean addCreationDate() {
        try {
      /* bugfix by 'taqua' (Thomas) */
      final SimpleDateFormat sdf = new SimpleDateFormat(
          "EEE MMM dd HH:mm:ss zzz yyyy");
      return add(new Meta(Element.CREATIONDATE, sdf.format(new Date())));
    } catch (DocumentException de) {
            throw new ExceptionConverter(de);
        }
    }
View Full Code Here

  /** {@inheritDoc} */
  public Program getProgram(String uniqueID) {
    String[] id = uniqueID.split("_");
    Date progDate;
    try {
      java.util.Date date = new SimpleDateFormat(MutableProgram.ID_DATE_FORMAT).parse(id[4]);
      Calendar cal = Calendar.getInstance();
      cal.setTimeInMillis(date.getTime());
      progDate = new Date(cal);
    } catch (ParseException e) {
      mLog.severe("Couldn't parse date from unique ID");
View Full Code Here

                    prop.setBooleanValue(true);
                } else {
                    prop.setBooleanValue(false);
                }
            } else if ("date".equals(elementType)) {
                SimpleDateFormat format = new SimpleDateFormat(DATEFORMAT);

                try {
                    Date date = format.parse(charValue);

                    prop.setDateValue(date);
                } catch (ParseException e) {
                    prop.setStringValue(charValue);
                }
View Full Code Here

                    currentNode.setBoolean(elementName, true);
                } else {
                    currentNode.setBoolean(elementName, false);
                }
            } else if ("date".equals(elementType)) {
                SimpleDateFormat format = new SimpleDateFormat(DATEFORMAT);

                try {
                    Date date = format.parse(charValue);

                    currentNode.setDate(elementName, date);
                } catch (ParseException e) {
                    currentNode.setString(elementName, charValue);
                }
View Full Code Here

      resetOptions();
      m_createText = PROPERTIES.getProperty("CREATE_STRING");
      m_createDouble = PROPERTIES.getProperty("CREATE_DOUBLE");
      m_createInt = PROPERTIES.getProperty("CREATE_INT");
      m_createDate = PROPERTIES.getProperty("CREATE_DATE", "DATETIME");
      m_DateFormat = new SimpleDateFormat(PROPERTIES.getProperty("DateFormat", "yyyy-MM-dd HH:mm:ss"));
      m_idColumn = PROPERTIES.getProperty("idColumn");
  }
View Full Code Here

    /* (non-Javadoc)
     * @see com.enterprisedt.net.ftp.FTPFileParser#setLocale(java.util.Locale)
     */
    public void setLocale(Locale locale) {
        formatter1 = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss", locale);
        formatter2 = new SimpleDateFormat("dd-MMM-yyyy HH:mm", locale);
    }
View Full Code Here

    }
    StringBuffer result = new StringBuffer();
    result.append(e.getText());
    //    m_resultsString.append(e.getText());
    //    m_outText.setText(m_resultsString.toString());
    String name = (new SimpleDateFormat("HH:mm:ss - "))
      .format(new Date());
    name += e.getTextTitle();
    //    System.err.println(name);
    if (name.length() > 30) {
      name = name.substring(0, 30);
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.