def

func:toDateSpan

toDateSpan(x)

Convert the following objects into a DateSpan:

  • Func: function which evaluates to date range
  • DateSpan: return itself
  • Date: one day range
  • Span: return Span.toDateSpan
  • Str: evaluates to DateSpan.fromStr
  • Date..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 date
  • Number: 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

meta

supertypes

feature

Feature namespace of definitions formatted as feature:name

    func

Axon function