- Index
- »
- axon
- »
- func:toDateSpan
def
func:toDateSpan
toDateSpan(x)
Convert the following objects into a DateSpan:
Func: function which evaluates to date rangeDateSpan: return itselfDate: one day rangeSpan: returnSpan.toDateSpanStr: evaluates toDateSpan.fromStrDate..Date: starting and ending date (inclusive)Date..Number: starting date and num of days (day unit required)DateTime..DateTime: use starting/ending dates; if end is midnight, then use previous dateNumber: convert as year- null: use projMeta dateSpanDefault or default to today (deprecated)
Examples:
toDateSpan(2010-07-01..2010-07-03) >> 01-Jul-2010..03-Jul-2010 toDateSpan(2010-07-01..60day) >> 01-Jul-2010..29-Aug-2010 toDateSpan(2010-07) >> 01-Jul-2010..31-Jul-2010 toDateSpan(2010) >> 01-Jan-2010..31-Dec-2010 toDateSpan(pastWeek) // on 9 Aug >> 02-Aug-2010..09-Aug-2010