Table of Contents

Class DateTimeExtensions

Namespace
Wpf.Ui.Extensions
Assembly
Wpf.Ui.dll

A collection of several extensions to the DateTime class.

public static class DateTimeExtensions
Inheritance
DateTimeExtensions
Inherited Members

Methods

GetMicroTimestamp(DateTime)

Gets the number of microseconds that have elapsed since the Unix epoch, excluding leap seconds. The Unix epoch is 00:00:00 UTC on 1 January 1970.

public static long GetMicroTimestamp(this DateTime dateTime)

Parameters

dateTime DateTime

Returns

long

GetMillisTimestamp(DateTime)

Gets the number of milliseconds that have elapsed since the Unix epoch, excluding leap seconds. The Unix epoch is 00:00:00 UTC on 1 January 1970.

public static long GetMillisTimestamp(this DateTime dateTime)

Parameters

dateTime DateTime

Returns

long

GetTimestamp(DateTime)

Gets the number of seconds that have elapsed since the Unix epoch, excluding leap seconds. The Unix epoch is 00:00:00 UTC on 1 January 1970.

public static long GetTimestamp(this DateTime dateTime)

Parameters

dateTime DateTime

Returns

long