class DateUtils {

    static String createDateStringFromIntegerInput(
            @IntRange(from = 1, to = 12) int month,
            @IntRange(from = 0, to = 9999) int year) {
        String monthString = String.valueOf(month);
        if (monthString.length() == 1) {
            monthString = "0" + monthString;
        }

        String yearString = String.valueOf(year);
        // Three-digit years are invalid.
        if (yearString.length() == 3) {
            return "";
        }

        if (yearString.length() > 2) {
            yearString = yearString.substring(yearString.length() - 2);
        } else if (yearString.length() == 1) {
            yearString = "0" + yearString;
        }

        return monthString + yearString;
    }

}