All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.konduto.sdk.DateFormat Maven / Gradle / Ivy

Go to download

Easily integrate with Konduto (https://konduto.com), a fraud prevention service.

There is a newer version: 2.17.4
Show newest version
package com.konduto.sdk;

public enum DateFormat {
    ISO_DATETIME("yyyy-MM-dd'T'HH:mm:ss'Z'") {
        @Override
        public String getRegex() {
            return "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z";
        }
    },
    ISO_DATETIME_NO_SECONDS("yyyy-MM-dd'T'HH:mm'Z'") {
        @Override
        public String getRegex() {
            return "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}Z";
        }
    },
    DATE("yyyy-MM-dd") {
        @Override
        public String getRegex() {
            return "\\d{4}-\\d{2}-\\d{2}";
        }
    };

    private String format;

    DateFormat(String format) {
        this.format = format;
    }

    public String getFormat() {
        return format;
    }

    public abstract String getRegex();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy