EssentialsPartialDate Class

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Time
Assembly Skybrud.Essentials.dll
Visibility Public
Inheritance Object

Class representing a partial date (eg. only year and month).

public class EssentialsPartialDate { }

Properties

Type Name Summary
int Year

Gets the year, or 0 if not specified.

int Month

Gets the month, or 0 if not specified.

int Day

Gets the day, or 0 if not specified.

DateTime DateTime

Gets an instance of EssentialsPartialDate.DateTime representing the publication date. This instance will not be realiable in the way that an instance of EssentialsPartialDate.DateTime can't represent a partial date.

bool HasYear

Gets whether a year has been specified for this date.

bool HasMonth

Gets whether a month has been specified for this date.

bool HasDay

Gets whether a day has been specified for this date.

bool IsPartialDate

Gets whether the date is partial (missing either EssentialsPartialDate.Year, EssentialsPartialDate.Month or EssentialsPartialDate.Day).

Methods

Initializes a new instance of EssentialsPartialDate from the specified timestamp.

Initializes a new instance of EssentialsPartialDate from the specified timestamp.

Initializes a new instance of EssentialsPartialDate from the specified timestamp.

Parse(string) (static)

Converts the specified input string to its EssentialsPartialDate equivalent.

Converts the specified input string to its EssentialsPartialDate equivalent.

ToString() (virtual)

Returns a string representation of the partial date in the format of yyyy-MM-dd.

Converts the specified input string to its EssentialsPartialDate equivalent and returns a value that indicates whether the conversion succeeded.

Converts the specified input string to its EssentialsPartialDate equivalent and returns a value that indicates whether the conversion succeeded.