Table of Contents

Class NormalizeDate

Namespace
SunamoDateTime
Assembly
SunamoDateTime.dll

Provides methods to convert between DateTime and a compact short (16-bit) date representation.

public class NormalizeDate
Inheritance
NormalizeDate
Inherited Members
Extension Methods

Methods

AddMonths(short, int)

Adds the specified number of months to a compact short date and returns the new compact short date.

public static short AddMonths(short normalizedDate, int monthsToAdd)

Parameters

normalizedDate short

The compact short date to add months to

monthsToAdd int

The number of months to add

Returns

short

A new compact short date with the months added

From(short)

Converts a compact short date representation back to a DateTime.

public static DateTime From(short shortDate)

Parameters

shortDate short

The compact short date value to convert

Returns

DateTime

The corresponding DateTime

To(DateTime)

Converts a DateTime to a compact short (16-bit) date representation.

public static short To(DateTime dateTime)

Parameters

dateTime DateTime

The DateTime to convert

Returns

short

A short value encoding the date