diff --git a/src/main/java/org/quarkus/samples/petclinic/Temporals.java b/src/main/java/org/quarkus/samples/petclinic/Temporals.java new file mode 100644 index 0000000..7ec7756 --- /dev/null +++ b/src/main/java/org/quarkus/samples/petclinic/Temporals.java @@ -0,0 +1,22 @@ +package org.quarkus.samples.petclinic; + +import io.quarkus.qute.TemplateExtension; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; + +/** + * This is a temporary hack around + * this issue. + *
+ * The problem appears to be M1 specific and is being + * looked into by the Quarkus devs. + */ +@TemplateExtension +public class Temporals { + + private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + + public static String format(LocalDate localDate) { + return localDate.format(FORMATTER); + } +} diff --git a/src/main/resources/templates/createOrUpdateVisitForm.html b/src/main/resources/templates/createOrUpdateVisitForm.html index 9ab4e56..4d381f6 100644 --- a/src/main/resources/templates/createOrUpdateVisitForm.html +++ b/src/main/resources/templates/createOrUpdateVisitForm.html @@ -17,7 +17,7 @@