public.javadoc.org.spincast.plugins.dateformatter.DateFormatterDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
DateFormatterDefault (org.spincast:spincast-framework 1.13.0 API)
org.spincast.plugins.dateformatter
Class DateFormatterDefault
- java.lang.Object
-
- org.spincast.plugins.dateformatter.DateFormatterDefault
-
- All Implemented Interfaces:
- DateFormatter
public class DateFormatterDefault
extends Object
implements DateFormatter
-
-
Constructor Summary
Constructors
Constructor and Description
DateFormatterDefault(Date date,
LocaleResolver localeResolver,
TimeZoneResolver timeZoneResolver)
DateFormatterDefault(Instant instant,
LocaleResolver localeResolver,
TimeZoneResolver timeZoneResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
DateFormatter
datePattern(DatePattern datePattern)
The pattern to use for the *date* part (without
time).
DateFormatter
datePattern(String datePatternCustom)
The custom pattern to use for the *date* part (without
time).
String
format()
Format!
protected String
getDefaultSeparator()
DateFormatter
locale(Locale locale)
The locale to use.
DateFormatter
parts(DateParts dateParts)
Which part(s) of ther date to format and
output?
DateFormatter
separator(String separator)
The separator string to use between the date
part and the time part.
DateFormatter
timePattern(DatePattern timePattern)
The pattern to use for the *time* part (without
the date).
DateFormatter
timePattern(String timePatternCustom)
The custom pattern to use for the *time* part (without
the date).
DateFormatter
timeZone(TimeZone timeZone)
The timeZone to use.
-
-
Constructor Detail
-
DateFormatterDefault
public DateFormatterDefault(Instant instant,
LocaleResolver localeResolver,
TimeZoneResolver timeZoneResolver)
-
DateFormatterDefault
public DateFormatterDefault(Date date,
LocaleResolver localeResolver,
TimeZoneResolver timeZoneResolver)
-
Method Detail
-
locale
public DateFormatter locale(Locale locale)
Description copied from interface: DateFormatter
The locale to use.
Defaults to the one provided by the
LocaleResolver
.
- Specified by:
locale
in interface DateFormatter
-
timeZone
public DateFormatter timeZone(TimeZone timeZone)
Description copied from interface: DateFormatter
The timeZone to use.
- Specified by:
timeZone
in interface DateFormatter
-
parts
public DateFormatter parts(DateParts dateParts)
Description copied from interface: DateFormatter
Which part(s) of ther date to format and
output?
- Specified by:
parts
in interface DateFormatter
-
datePattern
public DateFormatter datePattern(DatePattern datePattern)
Description copied from interface: DateFormatter
The pattern to use for the *date* part (without
time).
- Specified by:
datePattern
in interface DateFormatter
-
datePattern
public DateFormatter datePattern(String datePatternCustom)
Description copied from interface: DateFormatter
The custom pattern to use for the *date* part (without
time).
- Specified by:
datePattern
in interface DateFormatter
-
timePattern
public DateFormatter timePattern(DatePattern timePattern)
Description copied from interface: DateFormatter
The pattern to use for the *time* part (without
the date).
- Specified by:
timePattern
in interface DateFormatter
-
timePattern
public DateFormatter timePattern(String timePatternCustom)
Description copied from interface: DateFormatter
The custom pattern to use for the *time* part (without
the date).
- Specified by:
timePattern
in interface DateFormatter
-
separator
public DateFormatter separator(String separator)
Description copied from interface: DateFormatter
The separator string to use between the date
part and the time part.
Defaults to " - ".
- Specified by:
separator
in interface DateFormatter
-
getDefaultSeparator
protected String getDefaultSeparator()
-
format
public String format()
Description copied from interface: DateFormatter
Format!
- Specified by:
format
in interface DateFormatter
Copyright © 2019. All rights reserved.