Fix "Configuring a Global Date and Time Format" example
Closes gh-30036
This commit is contained in:
@@ -1588,9 +1588,9 @@ For example, the following Java configuration registers a global `yyyyMMdd` form
|
||||
registrar.registerFormatters(conversionService);
|
||||
|
||||
// Register date conversion with a specific global format
|
||||
DateFormatterRegistrar registrar = new DateFormatterRegistrar();
|
||||
registrar.setFormatter(new DateFormatter("yyyyMMdd"));
|
||||
registrar.registerFormatters(conversionService);
|
||||
DateFormatterRegistrar anotherRegistrar = new DateFormatterRegistrar();
|
||||
anotherRegistrar.setFormatter(new DateFormatter("yyyyMMdd"));
|
||||
anotherRegistrar.registerFormatters(conversionService);
|
||||
|
||||
return conversionService;
|
||||
}
|
||||
@@ -1616,9 +1616,9 @@ For example, the following Java configuration registers a global `yyyyMMdd` form
|
||||
registrar.registerFormatters(this)
|
||||
|
||||
// Register date conversion with a specific global format
|
||||
val registrar = DateFormatterRegistrar()
|
||||
registrar.setFormatter(DateFormatter("yyyyMMdd"))
|
||||
registrar.registerFormatters(this)
|
||||
val anotherRegistrar = DateFormatterRegistrar()
|
||||
anotherRegistrar.setFormatter(DateFormatter("yyyyMMdd"))
|
||||
anotherRegistrar.registerFormatters(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user