File tree Expand file tree Collapse file tree
exercises/concept/booking-up-for-beauty/.docs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "blurb" : " There are several classes in Java to work with dates and time." ,
3- "authors" : [" sanderploegsma" ],
4- "contributors" : []
3+ "authors" : [
4+ " sanderploegsma"
5+ ],
6+ "contributors" : [
7+ " kahgoh"
8+ ]
59}
Original file line number Diff line number Diff line change @@ -118,7 +118,18 @@ printer.format(date);
118118// => "December 3, 2007"
119119```
120120
121+ A [ locale] [ locale ] can also be specified when creating the custom format to format and parse for different regions:
122+
123+ ``` java
124+ DateTimeFormatter . ofPattern(" MMMM d, yyyy" , Locale . FRENCH ). format(date);
125+ // => décembre 3, 2007
126+
127+ DateTimeFormatter . ofPattern(" MMMM d, yyyy" , Locale . of(" pt" )). format(date);
128+ // => dezembro 3, 2007
129+ ```
130+
121131[ iso-8601 ] : https://en.wikipedia.org/wiki/ISO_8601
122132[ localdate-docs ] : https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html
123133[ localdatetime-docs ] : https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html
134+ [ locale ] : https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html
124135[ datetimeformatter-docs ] : https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
Original file line number Diff line number Diff line change @@ -86,4 +86,14 @@ printer.format(date);
8686// => "December 3, 2007"
8787```
8888
89+ A locale can also be specified when creating the custom format to format and parse for different regions:
90+
91+ ``` java
92+ DateTimeFormatter . ofPattern(" MMMM d, yyyy" , Locale . FRENCH ). format(date);
93+ // => décembre 3, 2007
94+
95+ DateTimeFormatter . ofPattern(" MMMM d, yyyy" , Locale . of(" pt" )). format(date);
96+ // => dezembro 3, 2007
97+ ```
98+
8999[ iso-8601 ] : https://en.wikipedia.org/wiki/ISO_8601
Original file line number Diff line number Diff line change @@ -88,4 +88,14 @@ printer.format(date);
8888// => "December 3, 2007"
8989```
9090
91+ A locale can also be specified when creating the custom format to format and parse for different regions:
92+
93+ ``` java
94+ DateTimeFormatter . ofPattern(" MMMM d, yyyy" , Locale . FRENCH ). format(date);
95+ // => décembre 3, 2007
96+
97+ DateTimeFormatter . ofPattern(" MMMM d, yyyy" , Locale . of(" pt" )). format(date);
98+ // => dezembro 3, 2007
99+ ```
100+
91101[ iso-8601 ] : https://en.wikipedia.org/wiki/ISO_8601
You can’t perform that action at this time.
0 commit comments