def _computeTimestampRecordIdx(self, recordTS):
if self._aggregationPeriod is None:<EOL><INDENT>return None<EOL><DEDENT>if self._aggregationPeriod['<STR_LIT>'] > <NUM_LIT:0>:<EOL><INDENT>assert self._aggregationPeriod['<STR_LIT>'] == <NUM_LIT:0><EOL>result = int(<EOL>(recordTS.year * <NUM_LIT:12> + (recordTS.month-<NUM_LIT:1>)) /<EOL>self._aggregationPeriod['<STR_LIT>'])<EOL><DEDENT>elif self._aggregationPeriod['<STR_LIT>'] > <NUM_LIT:0>:<EOL><INDENT>delta = recordTS - datetime.datetime(year=<NUM_LIT:1>, month=<NUM_LIT:1>, day=<NUM_LIT:1>)<EOL>deltaSecs = delta.days * <NUM_LIT> * <NUM_LIT> * <NUM_LIT>+ delta.seconds+ delta.microseconds / <NUM_LIT><EOL>result = int(deltaSecs / self._aggregationPeriod['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>result = None<EOL><DEDENT>return result<EOL>
Give the timestamp of a record (a datetime object), compute the record's
        timestamp index - this is the timestamp divided by the aggregation period.


        Parameters:
        ------------------------------------------------------------------------
        recordTS:  datetime instance
        retval:    record timestamp index, or None if no aggregation period