gpt4 book ai didi

net.objectlab.kit.datecalc.common.WorkingWeek.intersection()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 03:47:05 25 4
gpt4 key购买 nike

本文整理了Java中net.objectlab.kit.datecalc.common.WorkingWeek.intersection()方法的一些代码示例,展示了WorkingWeek.intersection()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkingWeek.intersection()方法的具体详情如下:
包路径:net.objectlab.kit.datecalc.common.WorkingWeek
类名称:WorkingWeek
方法名:intersection

WorkingWeek.intersection介绍

[英]Create a new calendar with the intersection of WORKING days. e.g. if normal and arabic calendars are intersected, the week is 3 days: Fri-Sun.
[中]创建一个包含工作日交叉点的新日历。e、 g.如果普通日历和阿拉伯日历相交,则一周为3天:周五-周日。

代码示例

代码示例来源:origin: Appendium/objectlabkit

public DefaultCurrencyCalculatorConfig() {
  super();
  final Set<String> subjectToUsd = new HashSet<>();
  subjectToUsd.add("MXN");
  subjectToUsd.add("CLP");
  subjectToUsd.add("ARS");
  currenciesSubjectToCrossCcyForT1.put(CalculatorConstants.USD_CODE, subjectToUsd);
  workingWeeks.put("AED", WorkingWeek.ARABIC_WEEK);
  workingWeeks.put("BHD", WorkingWeek.ARABIC_WEEK);
  workingWeeks.put("EGP", WorkingWeek.ARABIC_WEEK);
  workingWeeks.put("KWD", WorkingWeek.ARABIC_WEEK);
  workingWeeks.put("OMR", WorkingWeek.ARABIC_WEEK);
  workingWeeks.put("QAR", WorkingWeek.ARABIC_WEEK);
  workingWeeks.put("SAR", WorkingWeek.ARABIC_WEEK.intersection(WorkingWeek.DEFAULT));
  workingWeeks.put("JOD", WorkingWeek.ARABIC_WEEK.intersection(WorkingWeek.DEFAULT));
}

代码示例来源:origin: Appendium/objectlabkit

public void testIntersection() {
    final WorkingWeek w1 = WorkingWeek.DEFAULT;
    final WorkingWeek w2 = WorkingWeek.ARABIC_WEEK;
    final WorkingWeek w3 = w1.intersection(w2);
    // working day
    Assert.assertTrue("Calendar.MONDAY", w3.isWorkingDayFromCalendar(Calendar.MONDAY));
    Assert.assertTrue("Calendar.TUESDAY", w3.isWorkingDayFromCalendar(Calendar.TUESDAY));
    Assert.assertTrue("Calendar.WEDNESDAY", w3.isWorkingDayFromCalendar(Calendar.WEDNESDAY));
    Assert.assertTrue("Calendar.THURSDAY", w3.isWorkingDayFromCalendar(Calendar.THURSDAY));
    Assert.assertFalse("Calendar.FRIDAY", w3.isWorkingDayFromCalendar(Calendar.FRIDAY));
    Assert.assertFalse("Calendar.SATURDAY", w3.isWorkingDayFromCalendar(Calendar.SATURDAY));
    Assert.assertFalse("Calendar.SUNDAY", w3.isWorkingDayFromCalendar(Calendar.SUNDAY));
  }
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com