@@ -47,6 +47,7 @@ public class FormatDelimited implements Format {
4747
4848 private final boolean bom ;
4949 private final boolean headerRow ;
50+ private final boolean quoteTemporal ;
5051 private final String delimiter ;
5152 private final String openQuote ;
5253 private final String closeQuote ;
@@ -229,6 +230,20 @@ public boolean hasHeaderRow() {
229230 return headerRow ;
230231 }
231232
233+ /**
234+ * If true (the default) date/time values will be surrounded by quotes, otherwise they will not.
235+ * @return true if date/time values should be surrounded by quotes, otherwise they will not.
236+ */
237+ @ Schema (description = """
238+ If true date/time values will be surrounded by quotes, otherwise they will not.
239+ """
240+ , defaultValue = "true"
241+ , requiredMode = Schema .RequiredMode .NOT_REQUIRED
242+ )
243+ public boolean isQuoteTemporal () {
244+ return quoteTemporal ;
245+ }
246+
232247 /**
233248 * The delimiter between field values in the output.
234249 * @return the delimiter between field values in the output.
@@ -340,6 +355,7 @@ public static class Builder {
340355 private boolean hidden = false ;
341356 private boolean bom = false ;
342357 private boolean headerRow = true ;
358+ private boolean quoteTemporal = true ;
343359 private String delimiter = "," ;
344360 private String openQuote = "\" " ;
345361 private String closeQuote = "\" " ;
@@ -423,6 +439,17 @@ public Builder hidden(final boolean hidden) {
423439 return this ;
424440 }
425441
442+ /**
443+ * Set the quoteTemporal property of the format.
444+ *
445+ * @param quoteTemporal the {@link FormatDelimited#isQuoteTemporal()} property of the format.
446+ * @return this Builder instance.
447+ */
448+ public Builder quoteTemporal (final boolean quoteTemporal ) {
449+ this .quoteTemporal = quoteTemporal ;
450+ return this ;
451+ }
452+
426453 /**
427454 * Set the {@link FormatDelimited#bom} value in the builder.
428455 * @param value The value for the {@link FormatDelimited#bom}.
@@ -508,7 +535,7 @@ public Builder newline(final String value) {
508535 * @return a new instance of the FormatDelimited class.
509536 */
510537 public FormatDelimited build () {
511- return new FormatDelimited (type , name , description , extension , filename , mediaType , hidden , bom , headerRow , delimiter , openQuote , closeQuote , escapeCloseQuote , replaceCloseQuote , newline );
538+ return new FormatDelimited (type , name , description , extension , filename , mediaType , hidden , bom , headerRow , quoteTemporal , delimiter , openQuote , closeQuote , escapeCloseQuote , replaceCloseQuote , newline );
512539 }
513540 }
514541
@@ -529,6 +556,7 @@ private FormatDelimited(final FormatType type
529556 , final boolean hidden
530557 , final boolean bom
531558 , final boolean headerRow
559+ , final boolean quoteTemporal
532560 , final String delimiter
533561 , final String openQuote
534562 , final String closeQuote
@@ -546,6 +574,7 @@ private FormatDelimited(final FormatType type
546574 this .hidden = hidden ;
547575 this .bom = bom ;
548576 this .headerRow = headerRow ;
577+ this .quoteTemporal = quoteTemporal ;
549578 this .delimiter = delimiter ;
550579 this .openQuote = openQuote ;
551580 this .closeQuote = closeQuote ;
0 commit comments