Java Code Examples for java.util.Date.setMinutes()

The following are Jave code examples for showing how to use setMinutes() of the java.util.Date class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: TimeSelector   File: PowerDateUtils.java   View Source Code Vote up 6 votes
/**
 * 向后10分钟
 * 
 * @param date
 * @return
 */
public static String getNowGisDateBackwardsString(String date) {
	SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
	String str = null;
	try {
		Date curDate = new Date(
				formatter.parse(date).getTime() - 10 * 60 * 1000);
		curDate.setMinutes(curDate.getMinutes() / 10 * 10);
		str = formatter.format(curDate);
		Log.i("time", "getNowGisDateBackwardsString" + str);
	} catch (ParseException e) {
		e.printStackTrace();
	}
	return str;

}
 
Example 2
Project: Android-Allocine-Api   File: Horaires.java   View Source Code Vote up 6 votes
public boolean isMoreThanToday() {
        try {
            String dateFormatted = getDate();

            Date now = new Date();
            now.setHours(0);
            now.setSeconds(0);
            now.setMinutes(0);

            SimpleDateFormat formater = new SimpleDateFormat("E dd MMMMM yyyy", Locale.FRANCE);
            Date date = formater.parse(dateFormatted);

            date.setHours(13);

            return date.equals(now) || date.after(now);
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
}
 
Example 3
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最后一秒 yyyy-MM-dd 23:59:59
 *
 * @param currentDate
 * @return
 */
public static Date getCurrEnd17(Date currentDate) {
    currentDate.setHours(23);
    currentDate.setMinutes(59);
    currentDate.setSeconds(59);
    return currentDate;
}
 
Example 4
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最后一秒 yyyy-MM-dd 23:59:59
 *
 * @param currentDate
 * @return
 */
public static Date getCurrEnd09(Date currentDate) {
    currentDate.setHours(23);
    currentDate.setMinutes(59);
    currentDate.setSeconds(59);
    return currentDate;
}
 
Example 5
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最后一秒 yyyy-MM-dd 23:59:59
 *
 * @param currentDate
 * @return
 */
public static Date getCurrEnd28(Date currentDate) {
    currentDate.setHours(23);
    currentDate.setMinutes(59);
    currentDate.setSeconds(59);
    return currentDate;
}
 
Example 6
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最后一秒 yyyy-MM-dd 23:59:59
 *
 * @param currentDate
 * @return
 */
public static Date getCurrEnd06(Date currentDate) {
    currentDate.setHours(23);
    currentDate.setMinutes(59);
    currentDate.setSeconds(59);
    return currentDate;
}
 
Example 7
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最后一秒 yyyy-MM-dd 23:59:59
 *
 * @param currentDate
 * @return
 */
public static Date getCurrEnd(Date currentDate) {
    currentDate.setHours(23);
    currentDate.setMinutes(59);
    currentDate.setSeconds(59);
    return currentDate;
}
 
Example 8
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得19:00 -> 20:00的最前一秒
 *
 * @param currentDate
 * @return
 */
public static Date getCurrStart1920(Date currentDate) {
    currentDate.setHours(19);
    currentDate.setMinutes(0);
    currentDate.setSeconds(0);
    return currentDate;
}
 
Example 9
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得22:00 -> 23:00的最前一秒
 *
 * @param currentDate
 * @return
 */
public static Date getCurrStart2223(Date currentDate) {
    currentDate.setHours(22);
    currentDate.setMinutes(0);
    currentDate.setSeconds(0);
    return currentDate;
}
 
Example 10
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最前一秒 yyyy-MM-dd 00:00:00
 *
 * @param currentDate
 * @return
 */
public static Date getCurrStart17(Date currentDate) {
    currentDate.setHours(0);
    currentDate.setMinutes(0);
    currentDate.setSeconds(0);
    return currentDate;
}
 
Example 11
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得02:00 -> 03:00的最前一秒
 *
 * @param currentDate
 * @return
 */
public static Date getCurrStart0203(Date currentDate) {
    currentDate.setHours(2);
    currentDate.setMinutes(0);
    currentDate.setSeconds(0);
    return currentDate;
}
 
Example 12
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最后一秒 yyyy-MM-dd 23:59:59
 *
 * @param currentDate
 * @return
 */
public static Date getCurrEnd31(Date currentDate) {
    currentDate.setHours(23);
    currentDate.setMinutes(59);
    currentDate.setSeconds(59);
    return currentDate;
}
 
Example 13
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最前一秒 yyyy-MM-dd 00:00:00
 *
 * @param currentDate
 * @return
 */
public static Date getCurrStart06(Date currentDate) {
    currentDate.setHours(0);
    currentDate.setMinutes(0);
    currentDate.setSeconds(0);
    return currentDate;
}
 
Example 14
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最前一秒 yyyy-MM-dd 00:00:00
 *
 * @param currentDate
 * @return
 */
public static Date getCurrStart01(Date currentDate) {
    currentDate.setHours(0);
    currentDate.setMinutes(0);
    currentDate.setSeconds(0);
    return currentDate;
}
 
Example 15
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最前一秒 yyyy-MM-dd 00:00:00
 *
 * @param currentDate
 * @return
 */
public static Date getCurrStart23(Date currentDate) {
    currentDate.setHours(0);
    currentDate.setMinutes(0);
    currentDate.setSeconds(0);
    return currentDate;
}
 
Example 16
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最前一秒 yyyy-MM-dd 00:00:00
 *
 * @param currentDate
 * @return
 */
public static Date getCurrStart03(Date currentDate) {
    currentDate.setHours(0);
    currentDate.setMinutes(0);
    currentDate.setSeconds(0);
    return currentDate;
}
 
Example 17
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得05:00 -> 06:00的最前一秒
 *
 * @param currentDate
 * @return
 */
public static Date getCurrStart0506(Date currentDate) {
    currentDate.setHours(5);
    currentDate.setMinutes(0);
    currentDate.setSeconds(0);
    return currentDate;
}
 
Example 18
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最后一秒 yyyy-MM-dd 23:59:59
 *
 * @param currentDate
 * @return
 */
public static Date getCurrEnd02(Date currentDate) {
    currentDate.setHours(23);
    currentDate.setMinutes(59);
    currentDate.setSeconds(59);
    return currentDate;
}
 
Example 19
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得06:00 -> 07:00的最前一秒
 *
 * @param currentDate
 * @return
 */
public static Date getCurrStart0607(Date currentDate) {
    currentDate.setHours(6);
    currentDate.setMinutes(0);
    currentDate.setSeconds(0);
    return currentDate;
}
 
Example 20
Project: xlight_android_native   File: DateUtil.java   View Source Code Vote up 5 votes
/**
 * 取得当前日期的最前一秒 yyyy-MM-dd 00:00:00
 *
 * @param currentDate
 * @return
 */
public static Date getCurrStart15(Date currentDate) {
    currentDate.setHours(0);
    currentDate.setMinutes(0);
    currentDate.setSeconds(0);
    return currentDate;
}