get the Chinese format time, with year to second - Android Internationalization

Android examples for Internationalization:Chinese

Description

get the Chinese format time, with year to second

Demo Code

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main{

    /**//w ww. j  a  v a 2s. c  o m
     * get the Chinese format time
     * 
     * @param date
     * @return
     */
    public static String getZhTime(Date date) {
        SimpleDateFormat f = new SimpleDateFormat(
                "yyyy nian MM yue dd ri hh shi mm fen ss miao ");
        return f.format(date);
    }

}

Related Tutorials