Table of Contents

Method PeriodStartAt

Namespace
MailFathom.Application.Retrieval.AskMail
Assembly
MailFathom.Application.dll

PeriodStartAt(DateTimeOffset)

Finds the start of the period an instant falls in, which is the key its counts are held under.

public DateTimeOffset PeriodStartAt(DateTimeOffset instant)

Parameters

instant DateTimeOffset

The moment to place in a period.

Returns

DateTimeOffset

The period's start, in UTC.

Remarks

Anchored at the Unix epoch, so where a period begins is a function of the clock alone and every restart of the process places it identically. Floored rather than truncated, so an instant before the epoch — which no clock this runs on reports, but which a test may hand it — lands on the start of its period rather than the end of the one before.