get the Chinese format time - Android Internationalization

Android examples for Internationalization:Chinese

Description

get the Chinese format time

Demo Code

import android.util.Log;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Main{

    /**//from  ww w .  j  a  v  a 2s .  c  o m
     * get the Chinese format time
     * 
     * @param date
     * @return
     */
    public static String getZhDate(Date date) {
        SimpleDateFormat f = new SimpleDateFormat("MM yue dd ri");
        return f.format(date);
    }

}

Related Tutorials