Java Integer to int2Date(Integer date, String interval)

Here you can find the source of int2Date(Integer date, String interval)

Description

int Date

License

Open Source License

Declaration

public static final String int2Date(Integer date, String interval) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private StringBuffer sb = null;

    public static final String int2Date(Integer date, String interval) {
        String line = String.valueOf(date);
        if (line.length() != 8) {
            return null;
        } else {/*from  w w  w .j  ava2  s . c om*/
            StringBuffer buf = new StringBuffer(10);
            buf.append(line.substring(0, 4));
            buf.append(interval);
            buf.append(line.subSequence(4, 6));
            buf.append(interval);
            buf.append(line.substring(6, 8));
            return buf.toString();
        }

    }

    public void append(String str) {
        sb.append(str);
    }
}

Related

  1. int2array(int sz, int seed)
  2. int2ba(int integer)
  3. int2BigEndianStr(int i)
  4. int2buff(int n)
  5. int2Char(int i)
  6. int2ddouble(final int i)
  7. int2double(int[] ia)
  8. int2EyptStr(int num)
  9. int2float(Integer integer)