Java Code Examples for org.springframework.format.datetime.standard.DateTimeFormatterRegistrar#setUseIsoFormat()

The following examples show how to use org.springframework.format.datetime.standard.DateTimeFormatterRegistrar#setUseIsoFormat() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestUtil.java    From java-microservices-examples with Apache License 2.0 5 votes vote down vote up
/**
 * Create a {@link FormattingConversionService} which use ISO date format, instead of the localized one.
 * @return the {@link FormattingConversionService}.
 */
public static FormattingConversionService createFormattingConversionService() {
    DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService ();
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(dfcs);
    return dfcs;
}
 
Example 2
Source File: TestUtil.java    From okta-jhipster-microservices-oauth-example with Apache License 2.0 5 votes vote down vote up
/**
 * Create a FormattingConversionService which use ISO date format, instead of the localized one.
 * @return the FormattingConversionService
 */
public static FormattingConversionService createFormattingConversionService() {
    DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService ();
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(dfcs);
    return dfcs;
}
 
Example 3
Source File: TestUtil.java    From cubeai with Apache License 2.0 5 votes vote down vote up
/**
 * Create a FormattingConversionService which use ISO date format, instead of the localized one.
 * @return the FormattingConversionService
 */
public static FormattingConversionService createFormattingConversionService() {
    DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService ();
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(dfcs);
    return dfcs;
}
 
Example 4
Source File: TestUtil.java    From cubeai with Apache License 2.0 5 votes vote down vote up
/**
 * Create a FormattingConversionService which use ISO date format, instead of the localized one.
 * @return the FormattingConversionService
 */
public static FormattingConversionService createFormattingConversionService() {
    DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService ();
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(dfcs);
    return dfcs;
}
 
Example 5
Source File: DateTimeFormatConfiguration.java    From spring-cloud-gray with Apache License 2.0 5 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
    registry.addConverter(new StringToDateConverter());
}
 
Example 6
Source File: TestUtil.java    From java-microservices-examples with Apache License 2.0 5 votes vote down vote up
/**
 * Create a {@link FormattingConversionService} which use ISO date format, instead of the localized one.
 * @return the {@link FormattingConversionService}.
 */
public static FormattingConversionService createFormattingConversionService() {
    DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService ();
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(dfcs);
    return dfcs;
}
 
Example 7
Source File: TestUtil.java    From albedo with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Create a {@link FormattingConversionService} which use ISO date format, instead of the localized one.
 *
 * @return the {@link FormattingConversionService}.
 */
public static FormattingConversionService createFormattingConversionService() {
	DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService();
	DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
	registrar.setUseIsoFormat(true);
	registrar.registerFormatters(dfcs);
	return dfcs;
}
 
Example 8
Source File: TestUtil.java    From tutorials with MIT License 5 votes vote down vote up
/**
 * Create a FormattingConversionService which use ISO date format, instead of the localized one.
 * @return the FormattingConversionService
 */
public static FormattingConversionService createFormattingConversionService() {
    DefaultFormattingConversionService dfcs = new DefaultFormattingConversionService ();
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(dfcs);
    return dfcs;
}
 
Example 9
Source File: DateTimeFormatConfiguration.java    From java-microservices-examples with Apache License 2.0 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}
 
Example 10
Source File: DateTimeFormatConfiguration.java    From java-microservices-examples with Apache License 2.0 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}
 
Example 11
Source File: DateTimeFormatConfiguration.java    From java-microservices-examples with Apache License 2.0 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}
 
Example 12
Source File: DateTimeFormatConfiguration.java    From cubeai with Apache License 2.0 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}
 
Example 13
Source File: DateTimeFormatConfiguration.java    From tutorials with MIT License 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}
 
Example 14
Source File: DateTimeFormatConfiguration.java    From cubeai with Apache License 2.0 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}
 
Example 15
Source File: DateTimeFormatConfiguration.java    From cubeai with Apache License 2.0 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}
 
Example 16
Source File: DateTimeFormatConfiguration.java    From tutorials with MIT License 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}
 
Example 17
Source File: DateTimeFormatConfiguration.java    From ehcache3-samples with Apache License 2.0 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}
 
Example 18
Source File: DateTimeFormatConfiguration.java    From jhipster-registry with Apache License 2.0 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}
 
Example 19
Source File: DateTimeFormatConfiguration.java    From tutorials with MIT License 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}
 
Example 20
Source File: DateTimeFormatConfiguration.java    From tutorials with MIT License 4 votes vote down vote up
@Override
public void addFormatters(FormatterRegistry registry) {
    DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
    registrar.setUseIsoFormat(true);
    registrar.registerFormatters(registry);
}