(self)
| 152 | return _maybe_add_count("us", delta / _ONE_MICRO) |
| 153 | |
| 154 | def _infer_daily_rule(self): |
| 155 | annual_rule = self._get_annual_rule() |
| 156 | if annual_rule: |
| 157 | nyears = self.year_deltas[0] |
| 158 | month = _MONTH_ABBREVIATIONS[self.index[0].month] |
| 159 | alias = f"{annual_rule}-{month}" |
| 160 | return _maybe_add_count(alias, nyears) |
| 161 | |
| 162 | quartely_rule = self._get_quartely_rule() |
| 163 | if quartely_rule: |
| 164 | nquarters = self.month_deltas[0] / 3 |
| 165 | mod_dict = {0: 12, 2: 11, 1: 10} |
| 166 | month = _MONTH_ABBREVIATIONS[mod_dict[self.index[0].month % 3]] |
| 167 | alias = f"{quartely_rule}-{month}" |
| 168 | return _maybe_add_count(alias, nquarters) |
| 169 | |
| 170 | monthly_rule = self._get_monthly_rule() |
| 171 | if monthly_rule: |
| 172 | return _maybe_add_count(monthly_rule, self.month_deltas[0]) |
| 173 | |
| 174 | if len(self.deltas) == 1: |
| 175 | # Daily as there is no "Weekly" offsets with CFTime |
| 176 | days = self.deltas[0] / _ONE_DAY |
| 177 | return _maybe_add_count("D", days) |
| 178 | |
| 179 | # CFTime has no business freq and no "week of month" (WOM) |
| 180 | return None |
| 181 | |
| 182 | def _get_annual_rule(self): |
| 183 | if len(self.year_deltas) > 1: |
no test coverage detected