本文整理了Java中org.joda.time.format.DateTimeFormatter.getPrinter0()
方法的一些代码示例,展示了DateTimeFormatter.getPrinter0()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DateTimeFormatter.getPrinter0()
方法的具体详情如下:
包路径:org.joda.time.format.DateTimeFormatter
类名称:DateTimeFormatter
方法名:getPrinter0
[英]Gets the internal printer object that performs the real printing work.
[中]获取执行实际打印工作的内部打印机对象。
代码示例来源:origin: joda-time/joda-time
public void printTo(
Appendable appenadble, long instant, Chronology chrono,
int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException {
InternalPrinter p = getFormatter(locale).getPrinter0();
p.printTo(appenadble, instant, chrono, displayOffset, displayZone, locale);
}
代码示例来源:origin: joda-time/joda-time
public void printTo(Appendable appendable, ReadablePartial partial, Locale locale) throws IOException {
InternalPrinter p = getFormatter(locale).getPrinter0();
p.printTo(appendable, partial, locale);
}
代码示例来源:origin: JodaOrg/joda-time
public void printTo(
Appendable appenadble, long instant, Chronology chrono,
int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException {
InternalPrinter p = getFormatter(locale).getPrinter0();
p.printTo(appenadble, instant, chrono, displayOffset, displayZone, locale);
}
代码示例来源:origin: JodaOrg/joda-time
public void printTo(Appendable appendable, ReadablePartial partial, Locale locale) throws IOException {
InternalPrinter p = getFormatter(locale).getPrinter0();
p.printTo(appendable, partial, locale);
}
代码示例来源:origin: joda-time/joda-time
/**
* Returns the pattern used by a particular style and locale.
* <p>
* The first character is the date style, and the second character is the
* time style. Specify a character of 'S' for short style, 'M' for medium,
* 'L' for long, and 'F' for full.
* A date or time may be omitted by specifying a style character '-'.
*
* @param style two characters from the set {"S", "M", "L", "F", "-"}
* @param locale locale to use, null means default
* @return the formatter
* @throws IllegalArgumentException if the style is invalid
* @since 1.3
*/
public static String patternForStyle(String style, Locale locale) {
DateTimeFormatter formatter = createFormatterForStyle(style);
if (locale == null) {
locale = Locale.getDefault();
}
// Not pretty, but it works.
return ((StyleFormatter) formatter.getPrinter0()).getPattern(locale);
}
代码示例来源:origin: joda-time/joda-time
/**
* Appends another formatter.
* <p>
* This extracts the underlying printer and parser and appends them
* The printer and parser interfaces are the low-level part of the formatting API.
* Normally, instances are extracted from another formatter.
* Note however that any formatter specific information, such as the locale,
* time-zone, chronology, offset parsing or pivot/default year, will not be
* extracted by this method.
*
* @param formatter the formatter to add
* @return this DateTimeFormatterBuilder, for chaining
* @throws IllegalArgumentException if formatter is null or of an invalid type
*/
public DateTimeFormatterBuilder append(DateTimeFormatter formatter) {
if (formatter == null) {
throw new IllegalArgumentException("No formatter supplied");
}
return append0(formatter.getPrinter0(), formatter.getParser0());
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Returns the pattern used by a particular style and locale.
* <p>
* The first character is the date style, and the second character is the
* time style. Specify a character of 'S' for short style, 'M' for medium,
* 'L' for long, and 'F' for full.
* A date or time may be omitted by specifying a style character '-'.
*
* @param style two characters from the set {"S", "M", "L", "F", "-"}
* @param locale locale to use, null means default
* @return the formatter
* @throws IllegalArgumentException if the style is invalid
* @since 1.3
*/
public static String patternForStyle(String style, Locale locale) {
DateTimeFormatter formatter = createFormatterForStyle(style);
if (locale == null) {
locale = Locale.getDefault();
}
// Not pretty, but it works.
return ((StyleFormatter) formatter.getPrinter0()).getPattern(locale);
}
代码示例来源:origin: JodaOrg/joda-time
/**
* Appends another formatter.
* <p>
* This extracts the underlying printer and parser and appends them
* The printer and parser interfaces are the low-level part of the formatting API.
* Normally, instances are extracted from another formatter.
* Note however that any formatter specific information, such as the locale,
* time-zone, chronology, offset parsing or pivot/default year, will not be
* extracted by this method.
*
* @param formatter the formatter to add
* @return this DateTimeFormatterBuilder, for chaining
* @throws IllegalArgumentException if formatter is null or of an invalid type
*/
public DateTimeFormatterBuilder append(DateTimeFormatter formatter) {
if (formatter == null) {
throw new IllegalArgumentException("No formatter supplied");
}
return append0(formatter.getPrinter0(), formatter.getParser0());
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
public void printTo(
Appendable appenadble, long instant, Chronology chrono,
int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException {
InternalPrinter p = getFormatter(locale).getPrinter0();
p.printTo(appenadble, instant, chrono, displayOffset, displayZone, locale);
}
代码示例来源:origin: Nextdoor/bender
public void printTo(
Appendable appenadble, long instant, Chronology chrono,
int displayOffset, DateTimeZone displayZone, Locale locale) throws IOException {
InternalPrinter p = getFormatter(locale).getPrinter0();
p.printTo(appenadble, instant, chrono, displayOffset, displayZone, locale);
}
代码示例来源:origin: Nextdoor/bender
public void printTo(Appendable appendable, ReadablePartial partial, Locale locale) throws IOException {
InternalPrinter p = getFormatter(locale).getPrinter0();
p.printTo(appendable, partial, locale);
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
public void printTo(Appendable appendable, ReadablePartial partial, Locale locale) throws IOException {
InternalPrinter p = getFormatter(locale).getPrinter0();
p.printTo(appendable, partial, locale);
}
代码示例来源:origin: Nextdoor/bender
/**
* Appends another formatter.
* <p>
* This extracts the underlying printer and parser and appends them
* The printer and parser interfaces are the low-level part of the formatting API.
* Normally, instances are extracted from another formatter.
* Note however that any formatter specific information, such as the locale,
* time-zone, chronology, offset parsing or pivot/default year, will not be
* extracted by this method.
*
* @param formatter the formatter to add
* @return this DateTimeFormatterBuilder, for chaining
* @throws IllegalArgumentException if formatter is null or of an invalid type
*/
public DateTimeFormatterBuilder append(DateTimeFormatter formatter) {
if (formatter == null) {
throw new IllegalArgumentException("No formatter supplied");
}
return append0(formatter.getPrinter0(), formatter.getParser0());
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* Appends another formatter.
* <p>
* This extracts the underlying printer and parser and appends them
* The printer and parser interfaces are the low-level part of the formatting API.
* Normally, instances are extracted from another formatter.
* Note however that any formatter specific information, such as the locale,
* time-zone, chronology, offset parsing or pivot/default year, will not be
* extracted by this method.
*
* @param formatter the formatter to add
* @return this DateTimeFormatterBuilder, for chaining
* @throws IllegalArgumentException if formatter is null or of an invalid type
*/
public DateTimeFormatterBuilder append(DateTimeFormatter formatter) {
if (formatter == null) {
throw new IllegalArgumentException("No formatter supplied");
}
return append0(formatter.getPrinter0(), formatter.getParser0());
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* Returns the pattern used by a particular style and locale.
* <p>
* The first character is the date style, and the second character is the
* time style. Specify a character of 'S' for short style, 'M' for medium,
* 'L' for long, and 'F' for full.
* A date or time may be omitted by specifying a style character '-'.
*
* @param style two characters from the set {"S", "M", "L", "F", "-"}
* @param locale locale to use, null means default
* @return the formatter
* @throws IllegalArgumentException if the style is invalid
* @since 1.3
*/
public static String patternForStyle(String style, Locale locale) {
DateTimeFormatter formatter = createFormatterForStyle(style);
if (locale == null) {
locale = Locale.getDefault();
}
// Not pretty, but it works.
return ((StyleFormatter) formatter.getPrinter0()).getPattern(locale);
}
代码示例来源:origin: Nextdoor/bender
/**
* Returns the pattern used by a particular style and locale.
* <p>
* The first character is the date style, and the second character is the
* time style. Specify a character of 'S' for short style, 'M' for medium,
* 'L' for long, and 'F' for full.
* A date or time may be ommitted by specifying a style character '-'.
*
* @param style two characters from the set {"S", "M", "L", "F", "-"}
* @param locale locale to use, null means default
* @return the formatter
* @throws IllegalArgumentException if the style is invalid
* @since 1.3
*/
public static String patternForStyle(String style, Locale locale) {
DateTimeFormatter formatter = createFormatterForStyle(style);
if (locale == null) {
locale = Locale.getDefault();
}
// Not pretty, but it works.
return ((StyleFormatter) formatter.getPrinter0()).getPattern(locale);
}
内容来源于网络,如有侵权,请联系作者删除!