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


Java Calendar.WEDNESDAY属性代码示例

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


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

示例1: getCalendarDay

private int getCalendarDay(String day) {
    if (day != null) day = day.trim();
    if (day.equalsIgnoreCase("MO"))
        return Calendar.MONDAY;
    if (day.equalsIgnoreCase("TU"))
        return Calendar.TUESDAY;
    if (day.equalsIgnoreCase("WE"))
        return Calendar.WEDNESDAY;
    if (day.equalsIgnoreCase("TH"))
        return Calendar.THURSDAY;
    if (day.equalsIgnoreCase("FR"))
        return Calendar.FRIDAY;
    if (day.equalsIgnoreCase("SA"))
        return Calendar.SATURDAY;
    if (day.equalsIgnoreCase("SU"))
        return Calendar.SUNDAY;
    return 0;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:18,代码来源:RecurrenceRule.java

示例2: getDayPeriodSummaryString

public static String getDayPeriodSummaryString(Context context, int[] daysOfWeek) {
    int[] weekdays = { Calendar.MONDAY, Calendar.TUESDAY, Calendar.WEDNESDAY, Calendar.THURSDAY,
            Calendar.FRIDAY };
    int[] weekend = { Calendar.SUNDAY, Calendar.SATURDAY };
    int[] everyday = { Calendar.SUNDAY, Calendar.MONDAY, Calendar.TUESDAY, Calendar.WEDNESDAY,
            Calendar.THURSDAY, Calendar.FRIDAY, Calendar.SATURDAY };
    if (Arrays.equals(daysOfWeek, weekend)) {
        return context.getString(R.string.alarm_list_weekend);
    } else if (Arrays.equals(daysOfWeek, weekdays)) {
        return context.getString(R.string.alarm_list_weekdays);
    } else if (Arrays.equals(daysOfWeek, everyday)) {
        return context.getString(R.string.alarm_list_every_day);
    } else {
        return getShortDayNamesString(daysOfWeek);
    }
}
 
开发者ID:Microsoft,项目名称:ProjectOxford-Apps-MimickerAlarm,代码行数:16,代码来源:DateTimeUtilities.java

示例3: dayStartCapacityAvailable

/** Used to find the fisrt day in the TechDataCalendarWeek where capacity != 0, beginning at dayStart, dayStart included.
 *
 * @param techDataCalendarWeek        The TechDataCalendarWeek cover
 * @param dayStart
 * @return a map with the  capacity (Double) available and moveDay (int): the number of day it's necessary to move to have capacity available
 */
public static Map<String, Object> dayStartCapacityAvailable(GenericValue techDataCalendarWeek,  int  dayStart) {
    Map<String, Object> result = FastMap.newInstance();
    int moveDay = 0;
    Double capacity = null;
    Time startTime = null;
    while (capacity == null || capacity.doubleValue()==0) {
        switch (dayStart) {
            case Calendar.MONDAY:
                capacity =  techDataCalendarWeek.getDouble("mondayCapacity");
                startTime =  techDataCalendarWeek.getTime("mondayStartTime");
                break;
            case Calendar.TUESDAY:
                capacity =  techDataCalendarWeek.getDouble("tuesdayCapacity");
                startTime =  techDataCalendarWeek.getTime("tuesdayStartTime");
                break;
            case Calendar.WEDNESDAY:
                capacity =  techDataCalendarWeek.getDouble("wednesdayCapacity");
                startTime =  techDataCalendarWeek.getTime("wednesdayStartTime");
                break;
            case Calendar.THURSDAY:
                capacity =  techDataCalendarWeek.getDouble("thursdayCapacity");
                startTime =  techDataCalendarWeek.getTime("thursdayStartTime");
                break;
            case Calendar.FRIDAY:
                capacity =  techDataCalendarWeek.getDouble("fridayCapacity");
                startTime =  techDataCalendarWeek.getTime("fridayStartTime");
                break;
            case Calendar.SATURDAY:
                capacity =  techDataCalendarWeek.getDouble("saturdayCapacity");
                startTime =  techDataCalendarWeek.getTime("saturdayStartTime");
                break;
            case Calendar.SUNDAY:
                capacity =  techDataCalendarWeek.getDouble("sundayCapacity");
                startTime =  techDataCalendarWeek.getTime("sundayStartTime");
                break;
        }
        if (capacity == null || capacity.doubleValue() == 0) {
            moveDay +=1;
            dayStart = (dayStart==7) ? 1 : dayStart +1;
        }
        //                Debug.logInfo("capacity loop: " + capacity+ " moveDay=" +moveDay, module);
    }
    result.put("capacity",capacity);
    result.put("startTime",startTime);
    result.put("moveDay",Integer.valueOf(moveDay));
    return result;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:53,代码来源:TechDataServices.java

示例4: dayEndCapacityAvailable

/** Used to find the last day in the TechDataCalendarWeek where capacity != 0, ending at dayEnd, dayEnd included.
 *
 * @param techDataCalendarWeek        The TechDataCalendarWeek cover
 * @param dayEnd
 * @return a map with the  capacity (Double) available, the startTime and  moveDay (int): the number of day it's necessary to move to have capacity available
 */
public static Map<String, Object> dayEndCapacityAvailable(GenericValue techDataCalendarWeek, int dayEnd) {
    Map<String, Object> result = FastMap.newInstance();
    int moveDay = 0;
    Double capacity = null;
    Time startTime = null;
    while (capacity == null || capacity.doubleValue() == 0) {
        switch (dayEnd) {
            case Calendar.MONDAY:
                capacity =  techDataCalendarWeek.getDouble("mondayCapacity");
                startTime =  techDataCalendarWeek.getTime("mondayStartTime");
                break;
            case Calendar.TUESDAY:
                capacity =  techDataCalendarWeek.getDouble("tuesdayCapacity");
                startTime =  techDataCalendarWeek.getTime("tuesdayStartTime");
                break;
            case Calendar.WEDNESDAY:
                capacity =  techDataCalendarWeek.getDouble("wednesdayCapacity");
                startTime =  techDataCalendarWeek.getTime("wednesdayStartTime");
                break;
            case Calendar.THURSDAY:
                capacity =  techDataCalendarWeek.getDouble("thursdayCapacity");
                startTime =  techDataCalendarWeek.getTime("thursdayStartTime");
                break;
            case Calendar.FRIDAY:
                capacity =  techDataCalendarWeek.getDouble("fridayCapacity");
                startTime =  techDataCalendarWeek.getTime("fridayStartTime");
                break;
            case Calendar.SATURDAY:
                capacity =  techDataCalendarWeek.getDouble("saturdayCapacity");
                startTime =  techDataCalendarWeek.getTime("saturdayStartTime");
                break;
            case Calendar.SUNDAY:
                capacity =  techDataCalendarWeek.getDouble("sundayCapacity");
                startTime =  techDataCalendarWeek.getTime("sundayStartTime");
                break;
        }
        if (capacity == null || capacity.doubleValue() == 0) {
            moveDay -=1;
            dayEnd = (dayEnd==1) ? 7 : dayEnd - 1;
        }
    }
    result.put("capacity",capacity);
    result.put("startTime",startTime);
    result.put("moveDay",Integer.valueOf(moveDay));
    return result;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:52,代码来源:TechDataServices.java


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