ShrinkDate
function ShrinkDate (D : TDateTime) : Word;

TurboPack OnGuard FMX

ShrinkDate

function ShrinkDate (D : TDateTime) : Word;

Navigation:  »No topics above this level«

ShrinkDate

function ShrinkDate (D : TDateTime) : Word;

Return to chapter overview

_bm1ShrinkDate translates a date to an OnGuard date offset.

OnGuard uses a date offset to reduce the amount of space necessary to store a date. OnGuard creates a date offset by subtracting the TDateTime value for 1 January 1996 from the actual date.

Exceptions to the conversion rules are that a value of 0 expands to 1 January 9999 and date offsets larger than 65535 are represented as 0 (anything after 6 Jun 2175).

This routine is defined in the OnGuard unit. (as of 1.15 this routine has been moved to the OgUtil unit)