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

com.ibm.as400.access.BuildInfo Maven / Gradle / Ivy

The newest version!
package com.ibm.as400.access;

import java.text.SimpleDateFormat;


// This class is merely an input template to an autogenerated source class
// See use of maven-replacer-plugin in the project manifests
public class BuildInfo {
    static String s_compileDateTime = "2024-12-15 15:16:32 (GMT)";
    static String s_jtopenVersion = "20.0.8";
    static boolean s_isDevelopmentBuild = !Boolean.valueOf("true");

    public static boolean isDevelopmentBuild() {
        return s_isDevelopmentBuild;
    }
    public static String getVersion() {
        String devBuildSuffix = isDevelopmentBuild() ? " (development build)" : "";
        String v = s_jtopenVersion;
        if (v.startsWith("@")) {
            return ""+devBuildSuffix;
        }
        return v.trim().replaceFirst("^v", "")+devBuildSuffix;
    }

    public static String getTimestampString() {
        String ts = s_compileDateTime;
        if (ts.startsWith("@")) {
            return "";
        }
        return ts.trim();
    }

    public static String getTimestampYear() {
        try {
            SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            return ""+ fmt.parse("2024-12-15 15:16:32").getYear() + 1900;
         } catch(Exception e) {
            return "";
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy