Class DateExtensions (2.2.0)

public static class DateExtensions

Extension methods built for Date.

Inheritance

Object > DateExtensions

Namespace

Google.Type

Assembly

Google.Api.CommonProtos.dll

Methods

ToDate(DateTime)

public static Date ToDate(this DateTime dateTime)

Converts the Date part of DateTime to Date.

Parameter
NameDescription
dateTimeDateTime

The DateTime instance being converted.

Returns
TypeDescription
Date

The Date.

ToDate(DateTimeOffset)

public static Date ToDate(this DateTimeOffset dateTimeOffset)

Converts the Date part of DateTimeOffset to Date.

Parameter
NameDescription
dateTimeOffsetDateTimeOffset

The DateTimeOffset instance being converted.

Returns
TypeDescription
Date

The converted Date.