Here you can find the source of getMinutes()
public static int getMinutes()
//package com.java2s; //License from project: LGPL import java.util.*; public class Main { /**//from w w w . j a v a 2 s . c om * Minute=12 * */ public static final int MINUTE = Calendar.MINUTE; public static int getMinutes() { Calendar calendar = Calendar.getInstance(); return calendar.get(Calendar.MINUTE); } public static int getMinutes(final Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return calendar.get(Calendar.MINUTE); } }