DateWithinQ
DateWithinQ[date1,date2]
詳細
- DateWithinQ[date1, date2]の date1と date2は両方とも任意の粒度のDateObject式として指定されていなければならない.
- DateWithinQは,両方の引数に日付のリストを取り,事実上入力リストにOuterを呼び出す.
- DateWithinQは,date2が date1で表される期間に完全に含まれる場合に限りTrueを返す.
例題
すべて開く すべて閉じる例 (2)
スコープ (3)
DateWithinQ[{Yesterday, Today, Tomorrow}, Now]DateWithinQ[DateObject[{2022}, "Year"], {DateObject[{2022, 5, 9}, "Day"], DateObject[{2021, 8, 4}, "Day"], DateObject[{2022, 4}, "Month"]}]DateWithinQ[{DateObject[{2022}, "Year"], DateObject[{2021, 12}, "Month"]}, {DateObject[{2022, 6, 17}, "Day"], DateObject[{2021, 12, 25}, "Day"], Entity["Country", "SouthKorea"][EntityProperty["Country", "IndependenceDate"]]}]特性と関係 (3)
DateWithinQは,date2が完全にdate1に含まれている場合にのみTrueを返す:
DateWithinQ[DateObject[{2022, 1}, "Month"], DateObject[{2022, 1, 31}, "Week"]]DateOverlapsQを使って部分的な包含関係を調べることができる:
DateOverlapsQ[DateObject[{2022, 1}, "Month"], DateObject[{2022, 1, 31}, "Week"]]日付オブジェクトが他の日付オブジェクトに含まれる場合は,両者の差が暦の最大粒度で0になる:
DateWithinQ[DateObject[{2022}, "Year"], DateObject[{2022, 5, 9}, "Day"]]DateObject[{2022, 5, 9}, "Day"] - DateObject[{2022}, "Year"]ある日付オブジェクトが他の日付オブジェクトに含まれる場合,両者はその重なりのために比較することができない:
DateWithinQ[DateObject[{2023, 8}, "Month"], DateObject[{2023, 8, 4}, "Day"]]DateObject[{2023, 8}, "Month"] < DateObject[{2023, 8, 4}, "Day"]テキスト
Wolfram Research (2017), DateWithinQ, Wolfram言語関数, https://reference.wolfram.com/language/ref/DateWithinQ.html.
CMS
Wolfram Language. 2017. "DateWithinQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DateWithinQ.html.
APA
Wolfram Language. (2017). DateWithinQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DateWithinQ.html
BibTeX
@misc{reference.wolfram_2026_datewithinq, author="Wolfram Research", title="{DateWithinQ}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/DateWithinQ.html}", note=[Accessed: 09-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_datewithinq, organization={Wolfram Research}, title={DateWithinQ}, year={2017}, url={https://reference.wolfram.com/language/ref/DateWithinQ.html}, note=[Accessed: 09-September-2026]}