DateBounds
DateBounds[{date1,date2,…}]
gives the earliest and latest of the datei.
DateBounds[tseries]
gives the first and last dates in the time series tseries.
DateBounds[bin]
gives the first and last time stamps in the databin bin.
DateBounds[interval]
gives the start and end dates of the date interval interval.
DateBounds[interval,gran]
gives the endpoints of interval in the specified granularity gran.
Details
- DateBounds[dates] accepts dates in all standard date notations, including DateObject, DateList, AbsoluteTime, and DateString formats.
- For lists of dates, DateBounds returns dates in the same form in which they were given. For TemporalData and Databin, DateObject expressions are returned.
- DateBounds[tseries] works on all forms of TemporalData, including TimeSeries and EventSeries.
Examples
open allclose allBasic Examples (4)
Find the first and last dates in a list of date objects:
Find the first and last dates in a list of dates in different forms:
Find the temporal bounds of a TimeSeries:
Find the temporal bounds of a Databin:
Properties & Relations (5)
DateBounds returns the Min and Max associated with a list of DateObject expressions:
MinMax returns the same results as DateBounds if the input is a list of date objects:
DateBounds[ts] returns the dates corresponding to ts["FirstDate"] and ts["LastDate"]:
These are also the Min and Max values of ts["DateList"]:
DateBounds[bin] returns the dates corresponding to bin["TimeInterval"]:
These are also the Min and Max values of bin["Timestamps"]:
DateBounds accounts for differences in TimeZone when determining the first and last date:
For dates that are not a DateObject, $TimeZone is assumed:
Neat Examples (1)
Compare the date bounds associated with different databins:
Visualize the overlap between databins using TimelinePlot:
Text
Wolfram Research (2016), DateBounds, Wolfram Language function, https://reference.wolfram.com/language/ref/DateBounds.html (updated 2020).
CMS
Wolfram Language. 2016. "DateBounds." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/DateBounds.html.
APA
Wolfram Language. (2016). DateBounds. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DateBounds.html