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
Dmy
public uint Dmy { get; set; }
Property Value
Handle
public DateOwnedHandle Handle { get; }
Property Value
Julian
public uint Julian { get; set; }
Property Value
JulianDays
public uint JulianDays { get; set; }
Property Value
Month
public uint Month { get; set; }
Property Value
Year
public uint Year { get; set; }
Property Value
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
Clear(uint)
public void Clear(uint nDates)
Parameters
nDates
uint
Compare(Date)
public int Compare(Date rhs)
Parameters
rhs
Date
Returns
Copy()
[Version("2.56")]
public Date Copy()
Returns
DaysBetween(Date)
public int DaysBetween(Date date2)
Parameters
date2
Date
Returns
Equals(Date?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Date? other)
Parameters
other
DateAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
Free()
public void Free()
GetDay()
public DateDay GetDay()
Returns
GetDayOfYear()
public uint GetDayOfYear()
Returns
GetDaysInMonth(DateMonth, DateYear)
public static byte GetDaysInMonth(DateMonth month, DateYear year)
Parameters
Returns
GetGType()
public static Type GetGType()
Returns
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
GetJulian()
public uint GetJulian()
Returns
GetMondayWeekOfYear()
public uint GetMondayWeekOfYear()
Returns
GetMondayWeeksInYear(DateYear)
public static byte GetMondayWeeksInYear(DateYear year)
Parameters
year
DateYear
Returns
GetMonth()
public DateMonth GetMonth()
Returns
GetSundayWeekOfYear()
public uint GetSundayWeekOfYear()
Returns
GetSundayWeeksInYear(DateYear)
public static byte GetSundayWeeksInYear(DateYear year)
Parameters
year
DateYear
Returns
GetWeekday()
public DateWeekday GetWeekday()
Returns
GetYear()
public DateYear GetYear()
Returns
IsFirstOfMonth()
public bool IsFirstOfMonth()
Returns
IsLastOfMonth()
public bool IsLastOfMonth()
Returns
IsLeapYear(DateYear)
public static bool IsLeapYear(DateYear year)
Parameters
year
DateYear
Returns
New()
public static Date New()
Returns
NewDmy(DateDay, DateMonth, DateYear)
public static Date NewDmy(DateDay day, DateMonth month, DateYear year)
Parameters
Returns
NewJulian(uint)
public static Date NewJulian(uint julianDay)
Parameters
julianDay
uint
Returns
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
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
Returns
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
ValidDay(DateDay)
public static bool ValidDay(DateDay day)
Parameters
day
DateDay
Returns
ValidDmy(DateDay, DateMonth, DateYear)
public static bool ValidDmy(DateDay day, DateMonth month, DateYear year)
Parameters
Returns
ValidJulian(uint)
public static bool ValidJulian(uint julianDate)
Parameters
julianDate
uint
Returns
ValidMonth(DateMonth)
public static bool ValidMonth(DateMonth month)
Parameters
month
DateMonth
Returns
ValidWeekday(DateWeekday)
public static bool ValidWeekday(DateWeekday weekday)
Parameters
weekday
DateWeekday
Returns
ValidYear(DateYear)
public static bool ValidYear(DateYear year)
Parameters
year
DateYear