Skip to content

easyextensions DateTimeExtensions

BigMakCode edited this page Aug 5, 2024 · 1 revision

DateTimeExtensions Public class

Description

DateTime extensions.

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph EasyExtensions
  EasyExtensions.DateTimeExtensions[[DateTimeExtensions]]
  end
Loading

Members

Methods

Public Static methods

Returns Name
DateTime DropMilliseconds(...)
Remove milliseconds from DateTime .
Nullable<DateTime> ToNullable(DateTime value)
Convert datetime value to nullable datetime type.
DateTime ToUniversalTimeWithoutOffset(DateTime value)
Create new datetime with same values but DateTimeKind.Utc .

Details

Summary

DateTime extensions.

Methods

DropMilliseconds [1/2]

public static DateTime DropMilliseconds(DateTime value)
Arguments
Type Name Description
DateTime value
Summary

Remove milliseconds from DateTime .

Returns

DateTime without milliseconds.

DropMilliseconds [2/2]

public static DateTimeOffset DropMilliseconds(DateTimeOffset value)
Arguments
Type Name Description
DateTimeOffset value
Summary

Remove milliseconds from DateTime .

Returns

DateTime without milliseconds.

ToUniversalTimeWithoutOffset

public static DateTime ToUniversalTimeWithoutOffset(DateTime value)
Arguments
Type Name Description
DateTime value
Summary

Create new datetime with same values but DateTimeKind.Utc .

Returns

New datetime.

ToNullable

public static Nullable<DateTime> ToNullable(DateTime value)
Arguments
Type Name Description
DateTime value
Summary

Convert datetime value to nullable datetime type.

Returns

Wrapped datetime value.

Generated with ModularDoc

Clone this wiki locally