if(months == 12) { years++; months = 0; }
    public static String format(long millis, String format) {        StringBuffer buffer = new StringBuffer();        Token[] tokens = lexx(format);        int sz = tokens.length;        int years        = 0;        int months       = 0;        int days         = 0;        int hours        = 0;        int minutes      = 0;        int seconds      = 0;        int milliseconds = 0;        if(Token.containsTokenWithValue(tokens, y) ) {            years = (int) (millis / DateUtils.MILLIS_PER_YEAR);            millis = millis - (years * DateUtils.MILLIS_PER_YEAR);        }        if(Token.containsTokenWithValue(tokens, M) ) {            months = (int) (millis / DateUtils.MILLIS_PER_MONTH);            millis = millis - (months * DateUtils.MILLIS_PER_MONTH);        }        if(Token.containsTokenWithValue(tokens, d) ) {            days = (int) (millis / DateUtils.MILLIS_PER_DAY);            millis = millis - (days * DateUtils.MILLIS_PER_DAY);        }        if(Token.containsTokenWithValue(tokens, H) ) {            hours = (int) (millis / DateUtils.MILLIS_PER_HOUR);            millis = millis - (hours * DateUtils.MILLIS_PER_HOUR);        }        if(Token.containsTokenWithValue(tokens, m) ) {            minutes = (int) (millis / DateUtils.MILLIS_PER_MINUTE);            millis = millis - (minutes * DateUtils.MILLIS_PER_MINUTE);        }        if(Token.containsTokenWithValue(tokens, s) ) {            seconds = (int) (millis / DateUtils.MILLIS_PER_SECOND);            millis = millis - (seconds * DateUtils.MILLIS_PER_SECOND);        }        if(Token.containsTokenWithValue(tokens, S) ) {            milliseconds = (int) millis;        }        for(int i=0; i<sz; i++) {            Token token = tokens[i];            Object value = token.getValue();            int count = token.getCount();            if(value instanceof StringBuffer) {                buffer.append(value.toString());            } else {                if(value == y) {                    buffer.append( StringUtils.leftPad(""+years, count, "0") );                 } else                if(value == M) {                    buffer.append( StringUtils.leftPad(""+months, count, "0") );                 } else                if(value == d) {                    buffer.append( StringUtils.leftPad(""+days, count, "0") );                 } else                if(value == H) {                    buffer.append( StringUtils.leftPad(""+hours, count, "0") );                 } else                if(value == m) {                    buffer.append( StringUtils.leftPad(""+minutes, count, "0") );                 } else                if(value == s) {                    buffer.append( StringUtils.leftPad(""+seconds, count, "0") );                 } else                if(value == S) {                    buffer.append( StringUtils.leftPad(""+milliseconds, count, "0") );                 }            }        }                return buffer.toString();    }