Package org.joda.time.format

Examples of org.joda.time.format.DateTimeFormatterBuilder.toFormatter()


    }
    if(useTz) {
      builder.appendLiteral(" ");
      builder.appendTimeZoneShortName();
    }
    return builder.toFormatter();
  }
 

  public static DateTimeFormatter forPattern(String pattern) {
    return forPattern(pattern, false);
View Full Code Here


        // Assume tod is compatible with whatever was built and
        // tod.toISOString() does the correct thing
        builder.appendLiteral("T");
        builder.appendLiteral(tod.toISOString());
      }
      return builder.toFormatter();
    }

    @Override
    public TimexType getTimexType() {
      if (tod != null) return TimexType.TIME;
View Full Code Here

        if (!hasDate) {
          builder.clear();
        }
        appendTimeFormats(builder, flags);
      }
      return builder.toFormatter();
    }

    @Override
    public boolean isGrounded() {
      return false;
View Full Code Here

        new DateTimeFormatterBuilder();
      dateHourMinuteTimezone
        .append(ISODateTimeFormat.dateHourMinute());
      dateHourMinuteTimezone.append(DateTimeFormat.forPattern("ZZ"));
      yearMonthDayHourMinuteZone =
        dateHourMinuteTimezone.toFormatter().withOffsetParsed();
    }
    return yearMonthDayHourMinuteZone;
  }
 
  /**
 
View Full Code Here

                builder.appendLiteral(character);
            }
        }

        try {
            return builder.toFormatter();
        }
        catch (UnsupportedOperationException e) {
            throw new PrestoException(StandardErrorCode.INVALID_FUNCTION_ARGUMENT.toErrorCode(), e);
        }
    }
View Full Code Here

                builder.appendLiteral(character);
            }
        }

        try {
            return builder.toFormatter();
        }
        catch (UnsupportedOperationException e) {
            throw new PrestoException(INVALID_FUNCTION_ARGUMENT.toErrorCode(), e);
        }
    }
View Full Code Here

                builder.appendLiteral(character);
            }
        }

        try {
            return builder.toFormatter();
        }
        catch (UnsupportedOperationException e) {
            throw new PrestoException(INVALID_FUNCTION_ARGUMENT.toErrorCode(), e);
        }
    }
View Full Code Here

  public static DateTimeFormatter buildDateTimeFormatter(DateTimeFieldType... dateTimeFieldTypes) {
    DateTimeFormatterBuilder b = new DateTimeFormatterBuilder();
    for (DateTimeFieldType dt : dateTimeFieldTypes) {
      b.appendText(dt);
    }
    return b.toFormatter();
  }
}
View Full Code Here

            else {
                builder.appendLiteral(character);
            }
        }

        return builder.toFormatter();
    }
}
View Full Code Here

            else {
                builder.appendLiteral(character);
            }
        }

        return builder.toFormatter();
    }
}
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.