Skip to content

Commit df8edb0

Browse files
committed
Update formatDate documentation with Java 20+ changes
1 parent c46d303 commit df8edb0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

grails-doc/src/en/ref/Tags - GSP/formatDate.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Formats `java.util.Date`, `java.time.LocalDate`, and `java.time.LocalDateTime` i
5757

5858
Attributes
5959

60+
WARNING: In Java 20+, https://cldr.unicode.org/downloads/cldr-42[Unicode CLDR42] was implemented which changed the space character preceding the period (AM or PM) in formatted date/time text from a standard space (" ") to a narrow non-breaking space (NNBSP: "\u202F"). Additionally, when using the LONG or FULL timeStyle with dateStyle, the date and time separator has changed from ' at ' to ', '. IE. January 5, 1941, 8:00:00 AM UTC vs. January 5, 1941 at 8:00:00 AM UTC
61+
6062
* `date` (required) - The date object to format. It could be the instance of `java.util.Date`, `java.time.LocalDate`, `java.time.LocalDateTime`.
6163
* `format` (optional) - The formatting pattern to use for the date, see {javase}java.base/java/text/SimpleDateFormat.html[SimpleDateFormat]
6264
* `formatName` (optional) - Look up `format` from the default MessageSource / ResourceBundle (i18n/*.properties file) with this key. If `format` and `formatName` are empty, `format` is looked up with '`default.date.format`' key. Defaults to 'yyyy-MM-dd HH:mm:ss z' if the key not specified

0 commit comments

Comments
 (0)