Examples of DateParser


Examples of com.caucho.quercus.lib.date.DateModule.DateParser

    return DateModule.dateImpl(format, time, calendar);
  }
 
  public void modify(String modify)
  {
    DateParser parser = new DateParser(modify, _qDate);
   
    long time = parser.parse();
   
    setTime(time);
  }
View Full Code Here

Examples of com.joestelmach.natty.generated.DateParser

   * @param value
   * @return
   * @throws Exception
   */
  protected String buildAST(String value) throws Exception {
    DateParser parser = buildParser(value);
    Class<?> klass = Class.forName("com.joestelmach.natty.generated.DateParser");
    Method meth = klass.getMethod(_ruleName, (Class<?>[]) null);
    ParserRuleReturnScope ret = (ParserRuleReturnScope) meth.invoke(parser, (Object[]) null);
   
    Tree tree = (Tree)ret.getTree();
View Full Code Here

Examples of com.joestelmach.natty.generated.DateParser

    DateLexer lexer = new DateLexer(input);
    CommonTokenStream tokens = new CommonTokenStream(lexer);
     
    // parse
    ParseListener listener = new ParseListener();
    return new DateParser(tokens, listener);
  }
View Full Code Here

Examples of com.joestelmach.natty.generated.DateParser

    _logger.fine("sub-token stream: " + tokenString.toString());
   
    try {
      // parse
      ParseListener listener = new ParseListener();
      DateParser parser = new DateParser(stream, listener);
      DateParser.parse_return parseReturn = parser.parse();
     
      Tree tree = (Tree) parseReturn.getTree();
      _logger.fine("AST: " + tree.toStringTree());
     
      // we only continue if a meaningful syntax tree has been built
View Full Code Here

Examples of kore.util.DateParser

  // Public Class Methods

  public synchronized static long parse(String string)
  {
    return new DateParser(string).parse();
  }
View Full Code Here

Examples of org.apache.isis.viewer.bdd.common.parsers.DateParser

            // otherwise, see if date and if so compare as such
            final DateValueFacet dateValueFacet = resultAdapter.getSpecification().getFacet(DateValueFacet.class);
            if (dateValueFacet != null) {
                final Date resultDate = dateValueFacet.dateValue(resultAdapter);

                final DateParser dateParser = performContext.getDateParser();
                final Date expectedDate = dateParser.parse(expected);
                if (expectedDate != null) {
                    if (expectedDate.compareTo(resultDate) == 0) {
                        return resultAdapter; // ok
                    }
                }
                final String format = dateParser.format(resultDate);
                throw ScenarioBoundValueException.current(arg0Binding, format);
            }

            // otherwise, compare title
            if (!StringUtils.nullSafeEquals(resultTitle, expected)) {
View Full Code Here

Examples of org.apache.sling.jackrabbit.usermanager.post.impl.DateParser

    // ---------- SCR Integration ----------------------------------------------

    protected void activate(ComponentContext context) {
        Dictionary<?, ?> props = context.getProperties();

        dateParser = new DateParser();
        String[] dateFormats = OsgiUtil.toStringArray(props.get(PROP_DATE_FORMAT));
        for (String dateFormat : dateFormats) {
            dateParser.register(dateFormat);
        }
    }
View Full Code Here

Examples of org.apache.sling.servlets.post.impl.helper.DateParser

    @Modified
    private void configure(final Map<String, Object> configuration) {
        this.baseVersioningConfiguration = createBaseVersioningConfiguration(configuration);

        final DateParser dateParser = new DateParser();
        final String[] dateFormats = OsgiUtil.toStringArray(configuration.get(PROP_DATE_FORMAT));
        for (String dateFormat : dateFormats) {
            try {
                dateParser.register(dateFormat);
            } catch (Throwable t) {
                log.warn(
                    "configure: Ignoring DateParser format {} because it is invalid: {}",
                    dateFormat, t);
            }
View Full Code Here

Examples of org.apache.sling.servlets.post.impl.helper.DateParser

    // ---------- SCR Integration ----------------------------------------------

    protected void activate(ComponentContext context) {
        Dictionary<?, ?> props = context.getProperties();

        dateParser = new DateParser();
        String[] dateFormats = OsgiUtil.toStringArray(props.get(PROP_DATE_FORMAT));
        for (String dateFormat : dateFormats) {
            dateParser.register(dateFormat);
        }
    }
View Full Code Here

Examples of org.apache.sling.servlets.post.impl.helper.DateParser

     * handler that deals with file upload
     */
    private final SlingFileUploadHandler uploadHandler;

    public ModifyOperation() {
        this.dateParser = new DateParser();
        this.uploadHandler = new SlingFileUploadHandler();
    }
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.