class ObjectWriterImplLocalDate
        extends DateTimeCodec
        implements ObjectWriter {
    static final ObjectWriterImplLocalDate INSTANCE = new ObjectWriterImplLocalDate(null, null);

    private ObjectWriterImplLocalDate(String format, Locale locale) {
        super(format, locale);
    }

    public static ObjectWriterImplLocalDate of(String format, Locale locale) {
        if (format == null) {
            return INSTANCE;
        }
        return new ObjectWriterImplLocalDate(format, locale);
    }

    @Override
    public void writeJSONB(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) {
        if (format != null) {
            write(jsonWriter, object, fieldName, fieldType, features);
            return;
        }
        jsonWriter.writeLocalDate((LocalDate) object);
    }

    @Override
    public void write(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) {<FILL_FUNCTION_BODY>}
}

        if (object == null) {
            jsonWriter.writeNull();
            return;
        }

        JSONWriter.Context ctx = jsonWriter.context;

        LocalDate date = (LocalDate) object;

        if (formatUnixTime || (format == null && ctx.isDateFormatUnixTime())) {
            LocalDateTime dateTime = LocalDateTime.of(date, LocalTime.MIN);
            long millis = dateTime.atZone(ctx.getZoneId())
                    .toInstant()
                    .toEpochMilli();
            jsonWriter.writeInt64(millis / 1000);
            return;
        }

        if (formatMillis || (format == null && ctx.isDateFormatMillis())) {
            LocalDateTime dateTime = LocalDateTime.of(date, LocalTime.MIN);
            long millis = dateTime.atZone(ctx.getZoneId())
                    .toInstant()
                    .toEpochMilli();
            jsonWriter.writeInt64(millis);
            return;
        }

        if (yyyyMMdd8) {
            jsonWriter.writeDateYYYMMDD8(
                    date.getYear(),
                    date.getMonthValue(),
                    date.getDayOfMonth());
            return;
        }

        if (yyyyMMdd10) {
            jsonWriter.writeDateYYYMMDD10(
                    date.getYear(),
                    date.getMonthValue(),
                    date.getDayOfMonth());
            return;
        }

        if (yyyyMMddhhmmss19) {
            jsonWriter.writeDateTime19(
                    date.getYear(),
                    date.getMonthValue(),
                    date.getDayOfMonth(), 0, 0, 0);
            return;
        }

        DateTimeFormatter formatter = this.getDateFormatter();
        if (formatter == null) {
            formatter = ctx.getDateFormatter();
        }

        if (formatter == null) {
            jsonWriter.writeDateYYYMMDD10(
                    date.getYear(),
                    date.getMonthValue(),
                    date.getDayOfMonth()
            );
            return;
        }

        String str;
        if (formatHasHour || ctx.isDateFormatHasHour()) {
            str = formatter.format(LocalDateTime.of(date, LocalTime.MIN));
        } else {
            str = formatter.format(date);
        }

        jsonWriter.writeString(str);
    
<methods>public void <init>(java.lang.String) ,public void <init>(java.lang.String, java.util.Locale) ,public java.time.format.DateTimeFormatter getDateFormatter() ,public java.time.format.DateTimeFormatter getDateFormatter(java.util.Locale) <variables>java.time.format.DateTimeFormatter dateFormatter,public final non-sealed java.lang.String format,protected final non-sealed boolean formatHasDay,protected final non-sealed boolean formatHasHour,public final non-sealed boolean formatISO8601,public final non-sealed boolean formatMillis,public final non-sealed boolean formatUnixTime,public final non-sealed java.util.Locale locale,protected final non-sealed boolean useSimpleDateFormat,public final non-sealed boolean useSimpleFormatter,protected final non-sealed boolean yyyyMMdd10,protected final non-sealed boolean yyyyMMdd8,protected final non-sealed boolean yyyyMMddhhmm16,protected final non-sealed boolean yyyyMMddhhmmss14,protected final non-sealed boolean yyyyMMddhhmmss19