当前位置: 首页>>代码示例>>Java>>正文


Java DateTime.getDay方法代码示例

本文整理汇总了Java中hirondelle.date4j.DateTime.getDay方法的典型用法代码示例。如果您正苦于以下问题:Java DateTime.getDay方法的具体用法?Java DateTime.getDay怎么用?Java DateTime.getDay使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在hirondelle.date4j.DateTime的用法示例。


在下文中一共展示了DateTime.getDay方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getEvent

import hirondelle.date4j.DateTime; //导入方法依赖的package包/类
/**
 * Formatting string representation for a course
 * @param i
 * @return
 */
private String getEvent(int i) {
    DateTime start = agendas.get(i).getStartDate();
    DateTime end = agendas.get(i).getEndDate();

    String summary = agendas.get(i).getTrimmedTitle() + " ";

    //Gives time two digit representation
    summary += start.getDay() + ".";
    summary += start.getMonth() + " ";
    summary += String.format("%02d",start.getHour()) + ":";
    summary += String.format("%02d",start.getMinute()) + "-";
    summary += String.format("%02d",end.getHour()) + ":";
    summary += String.format("%02d",end.getMinute());

    return summary;
}
 
开发者ID:andrmos,项目名称:imber,代码行数:22,代码来源:CourseRecyclerViewAdapter.java

示例2: updateDateAndTimePickers

import hirondelle.date4j.DateTime; //导入方法依赖的package包/类
private void updateDateAndTimePickers(DateTime dateTime) {
	time.setCurrentHour(dateTime.getHour());
	time.setCurrentMinute(dateTime.getMinute());
	if (pickersAreInitialized) {
		date.updateDate(dateTime.getYear(), dateTime.getMonth() - 1, dateTime.getDay());
	} else {
		time.setOnTimeChangedListener(this);
		date.init(dateTime.getYear(), dateTime.getMonth() - 1, dateTime.getDay(), this);
		pickersAreInitialized = true;
		// manually set the variables once:
		selectedHour = dateTime.getHour();
		selectedMinute = dateTime.getMinute();
		selectedYear = dateTime.getYear();
		selectedMonth = dateTime.getMonth() - 1;
		selectedDay = dateTime.getDay();
		setWeekday();
	}
}
 
开发者ID:mathisdt,项目名称:trackworktime,代码行数:19,代码来源:EventEditActivity.java

示例3: setDate

import hirondelle.date4j.DateTime; //导入方法依赖的package包/类
private void setDate(DateTime dateTime) {
    this.date = Long.valueOf(getDateString(dateTime));

    this.year = dateTime.getYear();
    this.month = dateTime.getMonth();
    this.day = dateTime.getDay();
}
 
开发者ID:nutritionfactsorg,项目名称:daily-dozen-android,代码行数:8,代码来源:Day.java

示例4: convertDateTimeToDate

import hirondelle.date4j.DateTime; //导入方法依赖的package包/类
public static Date convertDateTimeToDate(DateTime dateTime) {
    int year = dateTime.getYear();
    int datetimeMonth = dateTime.getMonth();
    int day = dateTime.getDay();

    Calendar calendar = Calendar.getInstance();
    calendar.clear();

    // datetimeMonth start at 1. Need to minus 1 to get javaMonth
    calendar.set(year, datetimeMonth - 1, day);

    return calendar.getTime();
}
 
开发者ID:maheswaranapk,项目名称:Andorid-Material-Drop-Down-Date-Picker,代码行数:14,代码来源:CalendarHelper.java

示例5: getInfo

import hirondelle.date4j.DateTime; //导入方法依赖的package包/类
private String getInfo(DateTime date) {
    int month = date.getMonth();
    int day = date.getDay();
    int year = date.getYear();

    String stringDate = month + "/" + day + "/" + year;

    edu.uillinois.wseemann.uicombatschedule.utils.Date obj = (edu.uillinois.wseemann.uicombatschedule.utils.Date) extraData.get(stringDate);

    if (obj != null) {
        return obj.getInfo();
    }

    return null;
}
 
开发者ID:wseemann,项目名称:UICombatSchedule,代码行数:16,代码来源:CustomCaldroidAdapter.java

示例6: convertDateTimeToDate

import hirondelle.date4j.DateTime; //导入方法依赖的package包/类
public static Date convertDateTimeToDate(DateTime dateTime) {
	int year = dateTime.getYear();
	int datetimeMonth = dateTime.getMonth();
	int day = dateTime.getDay();

	Calendar calendar = Calendar.getInstance();
	calendar.clear();

	// datetimeMonth start at 1. Need to minus 1 to get javaMonth
	calendar.set(year, datetimeMonth - 1, day);

	return calendar.getTime();
}
 
开发者ID:FrancescoDesogus,项目名称:IUM_Project_SwimDroid,代码行数:14,代码来源:CalendarHelper.java


注:本文中的hirondelle.date4j.DateTime.getDay方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。