示例#1
0
        //# __________ PROTOCOL :: FORMAT __________ #//
        public static String Format_h_mm_am(JwTime t)
        {
            if ( t == null )
                return null;

            int hh = t.GetHour();
            int mm = t.GetMinute();
            String suffix = AM;
            if ( t.IsPm() )
            {
                hh -= 12;
                suffix = PM;
            }
            if ( hh == 0 ) hh = 12;
            return hh + COLON + Pad2(mm) + suffix;
        }
示例#2
0
        public static String Format_h_mm_ss_msss_am(JwTime t)
        {
            if ( t == null )
                return null;

            int hh = t.GetHour();
            int mm = t.GetMinute();
            int ss = t.GetSecond();
            int ms = t.GetMillisecond();
            String suffix = AM;
            if ( t.IsPm() )
            {
                hh -= 12;
                suffix = PM;
            }
            if ( hh == 0 ) hh = 12;
            return hh + COLON + Pad2(mm) + COLON + Pad2(ss) + DOT + Pad3(ms) + suffix;
        }