DateOverlapsQ

DateOverlapsQ[date1,date2]

如果日历日期 date1date2 重合,返回 True,否则,返回 False.

更多信息

  • DateOverlapsQ[date1,date2] 中,date1date2 应被指定为任意日历粒度的 DateObject 表达式.
  • DateOverlapsQ 的两个参数都接受日期列表,实际上是对输入列表调用 Outer.
  • 如果 date1date2 表示的时间段有任何重合,DateOverlapsQ 返回 True.

范例

打开所有单元关闭所有单元

基本范例  (2)

NowToday 是重合的:

但是 NowYesterday 不重合:

测试给定的周是否与 2022 年 1 月重合:

范围  (3)

查看一个日期是否与几个不同的日期重合:

查看几个日期是否与给定日期重合:

查看几个日期是否与其他几个日期重合:

属性和关系  (3)

只要日期的任意部分重合,DateOverlapsQ 就返回 True

只有当 date2 完全被包含在 date1 中时,DateWithinQ 才返回 True

如果两个日期重合,它们的差将是以最大日历粒度计算得出的零:

如果两个日期对象重合,则无法对它们进行比较:

Wolfram Research (2017),DateOverlapsQ,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DateOverlapsQ.html.

文本

Wolfram Research (2017),DateOverlapsQ,Wolfram 语言函数,https://reference.wolfram.com/language/ref/DateOverlapsQ.html.

CMS

Wolfram 语言. 2017. "DateOverlapsQ." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/DateOverlapsQ.html.

APA

Wolfram 语言. (2017). DateOverlapsQ. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/DateOverlapsQ.html 年

BibTeX

@misc{reference.wolfram_2024_dateoverlapsq, author="Wolfram Research", title="{DateOverlapsQ}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/DateOverlapsQ.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_dateoverlapsq, organization={Wolfram Research}, title={DateOverlapsQ}, year={2017}, url={https://reference.wolfram.com/language/ref/DateOverlapsQ.html}, note=[Accessed: 22-November-2024 ]}