// Path: core/src/main/java/fixio/fixprotocol/fields/DateTimeFormatterWrapper.java
// public class DateTimeFormatterWrapper {
//     private final String pattern;
//     private final ZoneId zoneId;
//     private final DateTimeFormatter dateTimeFormatter;
//     private final String padding;
//     private final int paddingLen;
// 
//     public DateTimeFormatterWrapper(String pattern, ZoneId zoneId) {
//         this.pattern = pattern;
//         this.zoneId = zoneId;
//         int idx = pattern.indexOf('\'');
//         if (idx > 0) {
//             this.dateTimeFormatter = DateTimeFormatter.ofPattern(pattern.substring(0, idx)).withZone(zoneId);
//             this.padding = pattern.substring(idx).replaceAll("'", "");
//         } else {
//             this.dateTimeFormatter = DateTimeFormatter.ofPattern(pattern).withZone(zoneId);
//             this.padding = "";
//         }
//         this.paddingLen = this.padding.length();
//     }
// 
//     public String getPattern() {
//         return pattern;
//     }
// 
//     public ZoneId getZoneId() {
//         return zoneId;
//     }
// 
//     public DateTimeFormatter getDateTimeFormatter() {
//         return dateTimeFormatter;
//     }
// 
//     public String getPadding() {
//         return padding;
//     }
// 
// 
//     public String format(TemporalAccessor value) {
//         return dateTimeFormatter.format(value) + padding;
//     }
// 
//     public LocalDate parseLocalDate(String timestampString) {
//         return LocalDate.parse(timestampString, dateTimeFormatter);
//     }
// 
//     public LocalTime parseLocalTime(String timestampString) {
//         if (timestampString != null) {
//             if (paddingLen > 0) {
//                 int idx = timestampString.length() - paddingLen;
//                 return LocalTime.parse(timestampString.substring(0, idx), dateTimeFormatter);
//             } else {
//                 return LocalTime.parse(timestampString, dateTimeFormatter);
//             }
//         }
//         return null;
//     }
// 
//     public ZonedDateTime parseZonedDateTime(String timestampString) {
//         if (timestampString != null) {
//             if (paddingLen > 0) {
//                 int idx = timestampString.length() - paddingLen;
//                 return ZonedDateTime.parse(timestampString.substring(0, idx), dateTimeFormatter);
//             } else {
//                 return ZonedDateTime.parse(timestampString, dateTimeFormatter);
//             }
//         }
//         return null;
//     }
// }


import fixio.fixprotocol.fields.DateTimeFormatterWrapper;
import java.time.ZoneId;
import java.time.ZoneOffset;
package fixio.fixprotocol;



public class FixConst {

    public static final ZoneId DEFAULT_ZONE_ID = ZoneOffset.UTC;

    public static final String DATE_PATTERN = "yyyyMMdd";
    //
    public static final String TIME_PATTERN_SECONDS = "HH:mm:ss";
    public static final String TIME_PATTERN_MILLIS = "HH:mm:ss.SSS";
    public static final String TIME_PATTERN_MICROS = "HH:mm:ss.SSSSSS";
    public static final String TIME_PATTERN_NANOS = "HH:mm:ss.nnnnnnnnn";
    public static final String TIME_PATTERN_PICOS = "HH:mm:ss.nnnnnnnnn'000'"; // not supported by java.time at the moment, use nanos and pad '000'
    //
    public static final String DATE_TIME_PATTERN_SECONDS = DATE_PATTERN + "-" + TIME_PATTERN_SECONDS;
    public static final String DATE_TIME_PATTERN_MILLIS = DATE_PATTERN + "-" + TIME_PATTERN_MILLIS;
    public static final String DATE_TIME_PATTERN_MICROS = DATE_PATTERN + "-" + TIME_PATTERN_MICROS;
    public static final String DATE_TIME_PATTERN_NANOS = DATE_PATTERN + "-" + TIME_PATTERN_NANOS;
    public static final String DATE_TIME_PATTERN_PICOS = DATE_PATTERN + "-" + TIME_PATTERN_PICOS;
    //
    public static final int TIME_PATTERN_SECONDS_LENGTH = TIME_PATTERN_SECONDS.length();
    public static final int TIME_PATTERN_MILLIS_LENGTH = TIME_PATTERN_MILLIS.length();
    public static final int TIME_PATTERN_MICROS_LENGTH = TIME_PATTERN_MICROS.length();
    public static final int TIME_PATTERN_NANOS_LENGTH = TIME_PATTERN_NANOS.length();
    public static final int TIME_PATTERN_PICOS_LENGTH = TIME_PATTERN_PICOS.length();
    //
    public static final int DATE_TIME_PATTERN_SECONDS_LENGTH = DATE_TIME_PATTERN_SECONDS.length();
    public static final int DATE_TIME_PATTERN_MILLIS_LENGTH = DATE_TIME_PATTERN_MILLIS.length();
    public static final int DATE_TIME_PATTERN_MICROS_LENGTH = DATE_TIME_PATTERN_MICROS.length();
    public static final int DATE_TIME_PATTERN_NANOS_LENGTH = DATE_TIME_PATTERN_NANOS.length();
    public static final int DATE_TIME_PATTERN_PICOS_LENGTH = DATE_TIME_PATTERN_PICOS.length();
    //
// Path: core/src/main/java/fixio/fixprotocol/fields/DateTimeFormatterWrapper.java
// public class DateTimeFormatterWrapper {
//     private final String pattern;
//     private final ZoneId zoneId;
//     private final DateTimeFormatter dateTimeFormatter;
//     private final String padding;
//     private final int paddingLen;
// 
//     public DateTimeFormatterWrapper(String pattern, ZoneId zoneId) {
//         this.pattern = pattern;
//         this.zoneId = zoneId;
//         int idx = pattern.indexOf('\'');
//         if (idx > 0) {
//             this.dateTimeFormatter = DateTimeFormatter.ofPattern(pattern.substring(0, idx)).withZone(zoneId);
//             this.padding = pattern.substring(idx).replaceAll("'", "");
//         } else {
//             this.dateTimeFormatter = DateTimeFormatter.ofPattern(pattern).withZone(zoneId);
//             this.padding = "";
//         }
//         this.paddingLen = this.padding.length();
//     }
// 
//     public String getPattern() {
//         return pattern;
//     }
// 
//     public ZoneId getZoneId() {
//         return zoneId;
//     }
// 
//     public DateTimeFormatter getDateTimeFormatter() {
//         return dateTimeFormatter;
//     }
// 
//     public String getPadding() {
//         return padding;
//     }
// 
// 
//     public String format(TemporalAccessor value) {
//         return dateTimeFormatter.format(value) + padding;
//     }
// 
//     public LocalDate parseLocalDate(String timestampString) {
//         return LocalDate.parse(timestampString, dateTimeFormatter);
//     }
// 
//     public LocalTime parseLocalTime(String timestampString) {
//         if (timestampString != null) {
//             if (paddingLen > 0) {
//                 int idx = timestampString.length() - paddingLen;
//                 return LocalTime.parse(timestampString.substring(0, idx), dateTimeFormatter);
//             } else {
//                 return LocalTime.parse(timestampString, dateTimeFormatter);
//             }
//         }
//         return null;
//     }
// 
//     public ZonedDateTime parseZonedDateTime(String timestampString) {
//         if (timestampString != null) {
//             if (paddingLen > 0) {
//                 int idx = timestampString.length() - paddingLen;
//                 return ZonedDateTime.parse(timestampString.substring(0, idx), dateTimeFormatter);
//             } else {
//                 return ZonedDateTime.parse(timestampString, dateTimeFormatter);
//             }
//         }
//         return null;
//     }
// }


// Path: core/src/main/java/fixio/fixprotocol/FixConst.java
import fixio.fixprotocol.fields.DateTimeFormatterWrapper;
import java.time.ZoneId;
import java.time.ZoneOffset;

package fixio.fixprotocol;



public class FixConst {

    public static final ZoneId DEFAULT_ZONE_ID = ZoneOffset.UTC;

    public static final String DATE_PATTERN = "yyyyMMdd";
    //
    public static final String TIME_PATTERN_SECONDS = "HH:mm:ss";
    public static final String TIME_PATTERN_MILLIS = "HH:mm:ss.SSS";
    public static final String TIME_PATTERN_MICROS = "HH:mm:ss.SSSSSS";
    public static final String TIME_PATTERN_NANOS = "HH:mm:ss.nnnnnnnnn";
    public static final String TIME_PATTERN_PICOS = "HH:mm:ss.nnnnnnnnn'000'"; // not supported by java.time at the moment, use nanos and pad '000'
    //
    public static final String DATE_TIME_PATTERN_SECONDS = DATE_PATTERN + "-" + TIME_PATTERN_SECONDS;
    public static final String DATE_TIME_PATTERN_MILLIS = DATE_PATTERN + "-" + TIME_PATTERN_MILLIS;
    public static final String DATE_TIME_PATTERN_MICROS = DATE_PATTERN + "-" + TIME_PATTERN_MICROS;
    public static final String DATE_TIME_PATTERN_NANOS = DATE_PATTERN + "-" + TIME_PATTERN_NANOS;
    public static final String DATE_TIME_PATTERN_PICOS = DATE_PATTERN + "-" + TIME_PATTERN_PICOS;
    //
    public static final int TIME_PATTERN_SECONDS_LENGTH = TIME_PATTERN_SECONDS.length();
    public static final int TIME_PATTERN_MILLIS_LENGTH = TIME_PATTERN_MILLIS.length();
    public static final int TIME_PATTERN_MICROS_LENGTH = TIME_PATTERN_MICROS.length();
    public static final int TIME_PATTERN_NANOS_LENGTH = TIME_PATTERN_NANOS.length();
    public static final int TIME_PATTERN_PICOS_LENGTH = TIME_PATTERN_PICOS.length();
    //
    public static final int DATE_TIME_PATTERN_SECONDS_LENGTH = DATE_TIME_PATTERN_SECONDS.length();
    public static final int DATE_TIME_PATTERN_MILLIS_LENGTH = DATE_TIME_PATTERN_MILLIS.length();
    public static final int DATE_TIME_PATTERN_MICROS_LENGTH = DATE_TIME_PATTERN_MICROS.length();
    public static final int DATE_TIME_PATTERN_NANOS_LENGTH = DATE_TIME_PATTERN_NANOS.length();
    public static final int DATE_TIME_PATTERN_PICOS_LENGTH = DATE_TIME_PATTERN_PICOS.length();
    //
    public static final DateTimeFormatterWrapper DATE_FORMATTER = new DateTimeFormatterWrapper(DATE_PATTERN, DEFAULT_ZONE_ID);