is Hour Format for Context - Android android.content

Android examples for android.content:Context

Description

is Hour Format for Context

Demo Code

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

public class Main{

    public static boolean is24HourFormat(Context context) {

        boolean is24hFormat = android.text.format.DateFormat
                .is24HourFormat(context);

        return is24hFormat;
    }/* w  w w  . j a v  a  2  s .c  om*/

}

Related Tutorials