Here you can find the source of getAmPm(long time)
private static String getAmPm(long time)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static String getAmPm(long time) { SimpleDateFormat sf = new SimpleDateFormat("aa"); return sf.format(new Date(time)); // return getAmPmStr(time) == 0 ? mContext.getString(AM) : mContext.getString(PM); }/*from w w w .j a v a 2 s . c o m*/ }