---
title: Extensions
summary: API reference for Extensions.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.UnitStat
reference_type: package
---

# Extensions

Module containing date and rating-plan extension methods used by unit-stat retention logic.

## Purpose

- Calculate archive and delete cutoff dates from quarter boundaries.
- Expose additional extension helpers referenced by the broader package.

## Context

- Namespace: `SAIF.Business.UnitStat`
- Assembly/package: `SAIF.Business.UnitStat` (distributed as NuGet package `SAIF.BOF.Business.UnitStat`)

## Public members

| Member | Signature | Purpose |
| --- | --- | --- |
| UnitArchiveDate(d) | `<Extension()> Function UnitArchiveDate(ByVal d As Date) As Date` | Return the archive cutoff date: 155 months before the start of the quarter containing `d`. |
| UnitDeleteDate(d) | `<Extension()> Function UnitDeleteDate(ByVal d As Date) As Date` | Return the delete cutoff date: 30 years before the start of the quarter containing `d`. |
| QuarterStartDate(d) | `<Extension()> Function QuarterStartDate(ByVal d As Date) As Date` | Return the first day of the calendar quarter that contains `d`. |
| ERModFactor(Target) | `<Extension()> Function ERModFactor(ByVal Target As clsPolicyPeriodRatingPlan) As Decimal` | Return `Target.ERMod`, defaulting to `1` when the rating plan has no ER Mod factor, so periods with and without an experience-rating plan compare consistently. |

## Behavioral notes

- [BR-US-025](../../business-rules.md#br-us-025-units-within-155-months-of-the-current-quarter-start-date-are-archived-units-more-than-30-years-old-are-deleted) is implemented by the archive/delete date extensions.

## Constraints and usage notes

- The module exposes quarter-based retention helpers and a rating-plan ERMod convenience extension.

## Sources

- `Business\SAIF.Business.UnitStat\Extensions.vb`
