Class Date
Represents a date and time.
Inheritance
Namespace: Mannequin.Bindings
Assembly: Collapse.dll
Syntax
public class Date : object
Constructors
Date()
Get the current date.
Declaration
public Date()
Date(String)
Create a Date object from a serialized
Declaration
public Date(string serialized)
Parameters
Type | Name | Description |
---|---|---|
System.String | serialized |
See Also
Properties
Day
The current day
Declaration
public int Day { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Hour
The number of hours
Declaration
public int Hour { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Millisecond
The number of milliseconds
Declaration
public int Millisecond { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Minute
The number of minutes
Declaration
public int Minute { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Month
The current month
Declaration
public int Month { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Second
The number of seconds
Declaration
public int Second { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Year
The current year
Declaration
public int Year { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
AddDays(Int32)
Add amount
days to this Date.
Declaration
public void AddDays(int amount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | amount | The number of days to add |
AddHours(Int32)
Add amount
hours to this Date.
Declaration
public void AddHours(int amount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | amount | The number of hours to add |
AddMilliseconds(Int32)
Add amount
milliseconds to this Date.
Declaration
public void AddMilliseconds(int amount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | amount | The number of milliseconds to add |
AddMonths(Int32)
Add amount
months to this Date.
Declaration
public void AddMonths(int amount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | amount | The number of months to add |
AddSeconds(Int32)
Add amount
seconds to this Date.
Declaration
public void AddSeconds(int amount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | amount | The number of seconds to add |
AddYears(Int32)
Add amount
years to this Date.
Declaration
public void AddYears(int amount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | amount | The number of years to add |
Clone()
Declaration
public Date Clone()
Returns
Type | Description |
---|---|
Date |
Equals(Date)
Determine whether this Date is "equal to" (i.e. the same as) a specified date
Declaration
public bool Equals(Date date)
Parameters
Type | Name | Description |
---|---|---|
Date | date | The date to compare against |
Returns
Type | Description |
---|---|
System.Boolean | Whether this date is the same as the specified date |
IsGreaterThan(Date)
Determine whether this Date is "greater than" (i.e. after) a specified date
Declaration
public bool IsGreaterThan(Date date)
Parameters
Type | Name | Description |
---|---|---|
Date | date | The date to compare against |
Returns
Type | Description |
---|---|
System.Boolean | Whether this date is later than the specified date |
IsLessThan(Date)
Determine whether this Date is "less than" (i.e. before) a specified date
Declaration
public bool IsLessThan(Date date)
Parameters
Type | Name | Description |
---|---|---|
Date | date | The date to compare against |
Returns
Type | Description |
---|---|
System.Boolean | Whether this date is before than the specified date |
Serialize()
Serialize this Date to a storeable
Declaration
public string Serialize()
Returns
Type | Description |
---|---|
System.String | A serialized representation of this Date |