package org.soya.tools;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter;
import java.util.Calendar;
import java.util.Date;

/**
 * @author: Jun Gong
 */
public class Properties {

    public static String getVersion() {
        return "1.0.2-alpha";
    }

    public static String getCompilerName() {
        return "Soya";
    }

    public static String getCommandName() {
        return "soya";
    }

    public static String getBuildDate() {
        Date date = new Date();
        DateFormat format = new SimpleDateFormat("MM.yyyy");
        return format.format(date);
    }

    public static String getCopyright() {
        return "Copyright (c) 2013-" +  new SimpleDateFormat("yyyy").format(new Date()) + " Jun Gong";
    }

    public static String getVersionString() {
        return getCompilerName() + " version \"" + getVersion() + "\" [build " + getBuildDate() + "]\n" +
                getCopyright();
    }

    public static String getHelpString() {
        return "Usage: " + getCommandName() + " [option] ... [source file] arguments\n" +
               "   -v -version     display current version.\n" +
               "   -cp             class search path of directories and zip/jar files.\n" +
               "   -classpath      class search path of directories and zip/jar files.\n" +
               "   -h -help        display help message.";
    }
}

@@ -86,78 +86,8 @@
 at;%0A
-import java.time.format.DateTimeFormatter;%0Aimport java.util.Calendar;%0A
 impo
@@ -385,37 +385,38 @@
 a%22;%0A    %7D%0A%0A    p
-ublic
+rivate
  static String g
@@ -422,20 +422,20 @@
 getBuild
-Date
+Year
 () %7B%0A   
@@ -443,126 +443,289 @@
     
-Date date = new Date()
+return %222016%22;%0A    %7D%0A%0A    private static String getBuildMonth() %7B%0A        return %2203%22;%0A    %7D%0A%0A    private static String getBuildDay() %7B%0A        return %2222%22
 ;%0A    
+%7D%0A%0A
     
-DateFormat format = new SimpleDateFormat(%22MM.yyyy%22);%0A        return format.format(date
+private static String getBuildDate() %7B%0A        return getBuildYear() + %22.%22 + getBuildMonth() + %22.%22 + getBuildDay(
 );%0A 
@@ -815,60 +815,27 @@
 %22 + 
- new SimpleDateFormat(%22yyyy%22).format(new Date()
+getBuildYear(
 ) + %22
+,
  Jun

change version