is Hour to 24 range - Android java.util

Android examples for java.util:Date Time

Description

is Hour to 24 range

Demo Code


//package com.java2s;

import android.content.ContentResolver;
import android.content.Context;

public class Main {
    public static boolean isHourto24(Context context) {
        ContentResolver cr = context.getContentResolver();
        String strFormatTime = android.provider.Settings.System.getString(
                cr, android.provider.Settings.System.TIME_12_24);
        if (null != strFormatTime && strFormatTime.equals("24")) {
            return true;
        } else {//from   ww  w .j a va 2 s . com
            return false;
        }
    }
}

Related Tutorials