Examples of FastDateFormat


Examples of org.apache.commons.lang.time.FastDateFormat

        assertEquals("Round trip", in, out);
    }

    private String formatAsImap(Date date, TimeZone zone) {
        assertNotNull(date);
        FastDateFormat format = FastDateFormat.getInstance(
                "dd-MMM-yyyy hh:mm:ss Z", zone, Locale.US);
        String out = format.format(date);
        if (out.charAt(0) == '0') {
            out = ' ' + out.substring(1, out.length());
        }
        return out;
    }
View Full Code Here

Examples of org.apache.commons.lang.time.FastDateFormat

     * @param date
     *            <code>Date</code>, not null
     * @return encoded IMAP <code>date-time</code>, not null
     */
    public static String encodeDateTime(final Date date) {
        final FastDateFormat format = FastDateFormat.getInstance("dd-MMM-yyyy HH:mm:ss Z", TimeZone.getTimeZone("GMT"), Locale.US);
        final String result = format.format(date);
        return result;
    }
View Full Code Here

Examples of org.apache.commons.lang.time.FastDateFormat

        assertEquals("Round trip", in, out);
    }

    private String formatAsImap(Date date, TimeZone zone) {
        assertNotNull(date);
        FastDateFormat format = FastDateFormat.getInstance(
                "dd-MMM-yyyy hh:mm:ss Z", zone, Locale.US);
        String out = format.format(date);
        if (out.charAt(0) == '0') {
            out = ' ' + out.substring(1, out.length());
        }
        return out;
    }
View Full Code Here

Examples of org.apache.jasper.util.FastDateFormat

            timestampRaw = true;
        else {
            timestampRaw = false;
            timestampFormat = value;
            timestampFormatter =
                new FastDateFormat(new SimpleDateFormat(timestampFormat));
        }
    }
View Full Code Here

Examples of org.apache.jasper.util.FastDateFormat

      timestampRaw = true;
  else {
      timestampRaw = false;
      timestampFormat = value;
      timestampFormatter =
    new FastDateFormat(new SimpleDateFormat(timestampFormat));
  }
    }
View Full Code Here

Examples of org.apache.jasper.util.FastDateFormat

      timestampRaw = true;
  else {
      timestampRaw = false;
      timestampFormat = value;
      timestampFormatter =
    new FastDateFormat(new SimpleDateFormat(timestampFormat));
  }
    }
View Full Code Here

Examples of org.apache.jasper.util.FastDateFormat

      timestampRaw = true;
  else {
      timestampRaw = false;
      timestampFormat = value;
      timestampFormatter =
    new FastDateFormat(new SimpleDateFormat(timestampFormat));
  }
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.formatting.FastDateFormat

      if (context.dateFormat == null)
      {
        context.formatString = String.valueOf(formatStringRaw);
        context.locale = locale;
        context.timeZone = timeZone;
        context.dateFormat = new FastDateFormat(context.formatString, locale, timeZone);
      }
      else
      {
        if (ObjectUtilities.equal(context.formatString, formatStringRaw) == false ||
            ObjectUtilities.equal(context.locale, locale) == false ||
            ObjectUtilities.equal(context.timeZone, timeZone) == false)
        {
          context.timeZone = timeZone;
          context.locale = locale;
          context.formatString = String.valueOf(formatStringRaw);
          context.dateFormat = new FastDateFormat(context.formatString, locale, timeZone);
        }
      }

      return context.dateFormat.format(retval);
    }
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.