Table of Contents

Class Date

Namespace
GLib
Assembly
GLib-2.0.dll
public sealed class Date : BoxedRecord, IEquatable<Date>
Inheritance
Date
Implements
Inherited Members

Constructors

Date()

public Date()

Date(DateOwnedHandle)

public Date(DateOwnedHandle handle)

Parameters

handle DateOwnedHandle

Properties

Day

public uint Day { get; set; }

Property Value

uint

Dmy

public uint Dmy { get; set; }

Property Value

uint

Handle

public DateOwnedHandle Handle { get; }

Property Value

DateOwnedHandle

Julian

public uint Julian { get; set; }

Property Value

uint

JulianDays

public uint JulianDays { get; set; }

Property Value

uint

Month

public uint Month { get; set; }

Property Value

uint

Year

public uint Year { get; set; }

Property Value

uint

Methods

AddDays(uint)

public void AddDays(uint nDays)

Parameters

nDays uint

AddMonths(uint)

public void AddMonths(uint nMonths)

Parameters

nMonths uint

AddYears(uint)

public void AddYears(uint nYears)

Parameters

nYears uint

Clamp(Date, Date)

public void Clamp(Date minDate, Date maxDate)

Parameters

minDate Date
maxDate Date

Clear(uint)

public void Clear(uint nDates)

Parameters

nDates uint

Compare(Date)

public int Compare(Date rhs)

Parameters

rhs Date

Returns

int

Copy()

[Version("2.56")]
public Date Copy()

Returns

Date

DaysBetween(Date)

public int DaysBetween(Date date2)

Parameters

date2 Date

Returns

int

Equals(Date?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Date? other)

Parameters

other Date

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Free()

public void Free()

GetDay()

public DateDay GetDay()

Returns

DateDay

GetDayOfYear()

public uint GetDayOfYear()

Returns

uint

GetDaysInMonth(DateMonth, DateYear)

public static byte GetDaysInMonth(DateMonth month, DateYear year)

Parameters

month DateMonth
year DateYear

Returns

byte

GetGType()

public static Type GetGType()

Returns

Type

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetIso8601WeekOfYear()

[Version("2.6")]
public uint GetIso8601WeekOfYear()

Returns

uint

GetJulian()

public uint GetJulian()

Returns

uint

GetMondayWeekOfYear()

public uint GetMondayWeekOfYear()

Returns

uint

GetMondayWeeksInYear(DateYear)

public static byte GetMondayWeeksInYear(DateYear year)

Parameters

year DateYear

Returns

byte

GetMonth()

public DateMonth GetMonth()

Returns

DateMonth

GetSundayWeekOfYear()

public uint GetSundayWeekOfYear()

Returns

uint

GetSundayWeeksInYear(DateYear)

public static byte GetSundayWeeksInYear(DateYear year)

Parameters

year DateYear

Returns

byte

GetWeekday()

public DateWeekday GetWeekday()

Returns

DateWeekday

GetYear()

public DateYear GetYear()

Returns

DateYear

IsFirstOfMonth()

public bool IsFirstOfMonth()

Returns

bool

IsLastOfMonth()

public bool IsLastOfMonth()

Returns

bool

IsLeapYear(DateYear)

public static bool IsLeapYear(DateYear year)

Parameters

year DateYear

Returns

bool

New()

public static Date New()

Returns

Date

NewDmy(DateDay, DateMonth, DateYear)

public static Date NewDmy(DateDay day, DateMonth month, DateYear year)

Parameters

day DateDay
month DateMonth
year DateYear

Returns

Date

NewJulian(uint)

public static Date NewJulian(uint julianDay)

Parameters

julianDay uint

Returns

Date

Order(Date)

public void Order(Date date2)

Parameters

date2 Date

SetDay(DateDay)

public void SetDay(DateDay day)

Parameters

day DateDay

SetDmy(DateDay, DateMonth, DateYear)

public void SetDmy(DateDay day, DateMonth month, DateYear y)

Parameters

day DateDay
month DateMonth
y DateYear

SetJulian(uint)

public void SetJulian(uint julianDate)

Parameters

julianDate uint

SetMonth(DateMonth)

public void SetMonth(DateMonth month)

Parameters

month DateMonth

SetParse(string)

public void SetParse(string str)

Parameters

str string

SetTime(Time)

public void SetTime(Time time)

Parameters

time Time

SetTimeT(long)

[Version("2.10")]
public void SetTimeT(long timet)

Parameters

timet long

SetTimeVal(TimeVal)

[Version("2.10")]
public void SetTimeVal(TimeVal timeval)

Parameters

timeval TimeVal

SetYear(DateYear)

public void SetYear(DateYear year)

Parameters

year DateYear

Strftime(string, nuint, string, Date)

public static nuint Strftime(string s, nuint slen, string format, Date date)

Parameters

s string
slen nuint
format string
date Date

Returns

nuint

SubtractDays(uint)

public void SubtractDays(uint nDays)

Parameters

nDays uint

SubtractMonths(uint)

public void SubtractMonths(uint nMonths)

Parameters

nMonths uint

SubtractYears(uint)

public void SubtractYears(uint nYears)

Parameters

nYears uint

ToStructTm(IntPtr)

public void ToStructTm(IntPtr tm)

Parameters

tm IntPtr

Valid()

public bool Valid()

Returns

bool

ValidDay(DateDay)

public static bool ValidDay(DateDay day)

Parameters

day DateDay

Returns

bool

ValidDmy(DateDay, DateMonth, DateYear)

public static bool ValidDmy(DateDay day, DateMonth month, DateYear year)

Parameters

day DateDay
month DateMonth
year DateYear

Returns

bool

ValidJulian(uint)

public static bool ValidJulian(uint julianDate)

Parameters

julianDate uint

Returns

bool

ValidMonth(DateMonth)

public static bool ValidMonth(DateMonth month)

Parameters

month DateMonth

Returns

bool

ValidWeekday(DateWeekday)

public static bool ValidWeekday(DateWeekday weekday)

Parameters

weekday DateWeekday

Returns

bool

ValidYear(DateYear)

public static bool ValidYear(DateYear year)

Parameters

year DateYear

Returns

bool