Class DMCalendar

    • Constructor Detail

      • DMCalendar

        public DMCalendar()
      • DMCalendar

        public DMCalendar​(FastDateFormat dateFormat,
                          FastDateFormat dateTimeFormat)
    • Method Detail

      • timePeriodAsFilter

        public Filter timePeriodAsFilter​(CalendarUtil.TimePeriod timePeriod,
                                         String dateDimFieldName)
        Description copied from interface: DatamartContext.Calendar
        Helper method to build a filter representing dateDimFieldName in [timePeriod.startPeriod, timePeriod.endPeriod] Note the inclusion on both ends; this is to accommodate the most frequent use case where the TimePeriod is a single period, for example InvoiceDate in [2015,2015]. An example of a non-singular period filter is [2015-Q1, 2015-Q2]; see TimePerdiod for more details.
        Specified by:
        timePeriodAsFilter in interface DatamartContext.Calendar
        Parameters:
        timePeriod - The CalendarUtil.TimePeriod that the dateDimFieldName field needs to match.
        dateDimFieldName - The Datamart field of type 'Date' to filter on
        Returns:
        A Filter limiting the given date field to the given time period.