/** * Returns a period based on the given date string in ISO format. Returns * null if the date string cannot be parsed to a period. * * @param isoPeriod the date string in ISO format. * @return a period. */ public static Period getPeriodFromIsoString( String isoPeriod ) { if ( isoPeriod != null ) { PeriodType periodType = getPeriodTypeFromIsoString( isoPeriod ); try { return periodType != null ? periodType.createPeriod( isoPeriod ) : null; } catch ( Exception ex ) { // Do nothing and return null } } return null; }
PeriodType queryPt = filterPeriodType != null ? filterPeriodType : getPeriodTypeFromIsoString( dataRow.get( periodIndex ) ); PeriodType dataSetPt = dsPtMap.get( dataRow.get( dataSetIndex ) ); target = target * queryPt.getPeriodSpan( dataSetPt );