GregorianDate Structure |
Namespace: AGI.Foundation.Time
The GregorianDate type exposes the following members.
Name | Description | |
---|---|---|
GregorianDate(DateTime) | ||
GregorianDate(JulianDate) |
Initializes a GregorianDate from the provided
JulianDate. The new GregorianDate will be in the
CoordinatedUniversalTime (UTC) time standard.
| |
GregorianDate(Int32, Double) |
Initializes a GregorianDate from the provided values. The
fractional portion of the daysOfYear will be converted into
hours, minutes, and seconds.
| |
GregorianDate(JulianDate, TimeStandard) |
Initializes a GregorianDate from the provided
JulianDate. The new GregorianDate will be in the
provided TimeStandard.
| |
GregorianDate(Int32, Int32, Int32) |
Initializes a GregorianDate from the provided values. The
remaining values are assumed to be zero.
| |
GregorianDate(Int32, Int32, Int32, Int32, Double) |
Initializes a GregorianDate from the provided values.
| |
GregorianDate(Int32, Int32, Int32, Int32, Int32, Double) |
Initializes a GregorianDate from the provided values.
|
Name | Description | |
---|---|---|
Day |
Gets the day of the month (in the range 1 through the number of days in the
month).
| |
DayOfWeek | Gets the day of the week represented by this instance. | |
DayOfYear | Gets the day of the year represented by this instance. | |
Hour |
Gets the hour (in the range 0 through 23).
| |
JulianSecondsOfDay |
Gets the corresponding seconds past noon for this instance.
| |
Minute |
Gets the minute (in the range 0 through 59).
| |
Month |
Gets the month of the year (in the range 1 through 12).
| |
Now |
Gets the GregorianDate that represents the current date and time.
| |
Second |
Gets the second, including fractional seconds (in the range 0.0 up to, but not
including, 61.0). A value between 60.0 and 61.0 indicates a leap second.
| |
SecondsOfDay |
Gets the corresponding seconds past midnight for this instance.
| |
Year |
Gets the year.
|
Name | Description | |
---|---|---|
AddDays |
Adds the specified number of days to this date and returns the new date.
| |
AddHours |
Adds the specified number of hours to this date and returns the new date.
| |
AddMinutes |
Adds the specified number of minutes to this date and returns the new date.
| |
AddSeconds |
Adds the specified number of seconds to this date and returns the new date.
| |
CompareTo(GregorianDate) |
Compares this instance with another instance of the same type.
| |
CompareTo(Object) |
Compares this instance with another instance of the same type.
| |
Equals(GregorianDate) |
Indicates whether another instance of this type is exactly equal to this instance.
| |
Equals(Object) |
Indicates whether another object is exactly equal to this instance.
(Overrides ValueTypeEquals(Object).) | |
GetHashCode |
Returns a hash code for this instance, which is suitable for use in hashing algorithms and data structures like a hash table.
(Overrides ValueTypeGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsValid |
Indicates whether the date values provided are a valid representation of a date
and time.
| |
Parse(String) | Converts the specified string representation of a date and time to its GregorianDate equivalent. Note: GregorianDate is always assumed to be in UTC. You cannot parse strings containing time zone information. However, this will handle three common ISO8601 formats:
| |
Parse(String, IFormatProvider) | Converts the specified string representation of a date and time to its GregorianDate equivalent using the specified culture-specific format information. Note: GregorianDate is always assumed to be in UTC. You cannot parse strings containing time zone information. However, this will handle three common ISO8601 formats:
| |
ParseExact(String, String, IFormatProvider) | Converts the specified string representation of a date and time to its GregorianDate equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly. Note: GregorianDate is always assumed to be in UTC. You cannot parse strings containing time zone information. | |
ParseExact(String, String, IFormatProvider) | Converts the specified string representation of a date and time to its GregorianDate equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly. Note: GregorianDate is always assumed to be in UTC. You cannot parse strings containing time zone information. | |
RoundSeconds(Int32) |
Rounds this instance to the specified number of decimal digits in the seconds, rolling over to minutes, hours, days,
etc. as necessary. This instance is assumed to express a time in the CoordinatedUniversalTime
(UTC) time standard so the Second will be allowed to go above 60 during a leap second.
| |
RoundSeconds(Int32, TimeStandard) |
Rounds this instance to the specified number of decimal digits in the seconds, rolling over to minutes, hours, days,
etc. as necessary. If the specified timeStandard is CoordinatedUniversalTime,
(UTC), the seconds will be allowed to go above 60 during a leap second. For any other time standard, the
Second will be below 60.
| |
SubtractDays |
Subtracts the specified number of days from this date and returns the new date.
| |
SubtractHours |
Subtracts the specified number of hours from this date and returns the new date.
| |
SubtractMinutes |
Subtracts the specified number of minutes from this date and returns the new date.
| |
SubtractSeconds |
Subtracts the specified number of seconds from this date and returns the new date.
| |
ToDateTime | ||
ToIso8601String |
Converts the value of this instance to its equivalent ISO8601 extended string representation,
with fractional seconds represented to 15 digits.
| |
ToIso8601String(Iso8601Format) |
Converts the value of this instance to its equivalent ISO8601 string representation,
with fractional seconds represented to 15 digits.
| |
ToIso8601String(Iso8601Format, Int32) |
Converts the value of this instance to its equivalent ISO8601 string representation,
with fractional seconds represented to the specified number of digits.
| |
ToJulianDate |
Convert this GregorianDate to a JulianDate. The
time standard will be CoordinatedUniversalTime
(UTC), unless this GregorianDate represents the instant of a
leap second, in which case the JulianDate will be in
InternationalAtomicTime (TAI).
| |
ToJulianDate(TimeStandard) |
Convert this GregorianDate to a JulianDate. The
GregorianDate is assumed to specify a time in the
specified TimeStandard.
| |
ToLongDateString |
Converts the value of this instance to its equivalent long date string representation.
| |
ToLongTimeString |
Converts the value of this instance to its equivalent long time string representation.
| |
ToShortDateString |
Converts the value of this instance to its equivalent short date string representation.
| |
ToShortTimeString |
Converts the value of this instance to its equivalent short time string representation.
| |
ToString |
Converts the value of this instance to its equivalent string representation.
(Overrides ValueTypeToString.) | |
ToString(IFormatProvider) |
Converts the value of this instance to its equivalent string
representation using the specified culture-specific format information.
| |
ToString(String) |
Converts the value of this instance to its equivalent string
representation using the specified format.
| |
ToString(String, IFormatProvider) |
Converts the value of this instance to its equivalent string
representation using the specified format and culture-specific format information.
| |
TryParse(String, GregorianDate) | Converts the specified string representation of a date and time to its GregorianDate equivalent. Note: GregorianDate is always assumed to be in UTC. You cannot parse strings containing time zone information. However, this method handles three common ISO8601 formats:
| |
TryParse(String, IFormatProvider, GregorianDate) | Converts the specified string representation of a date and time to its GregorianDate equivalent using the specified culture-specific format information. Note: GregorianDate is always assumed to be in UTC. You cannot parse strings containing time zone information. However, this method handles three common ISO8601 formats:
|
Name | Description | |
---|---|---|
Equality |
Returns if the two instances are exactly equal.
| |
GreaterThan |
Returns if left is greater than right.
| |
GreaterThanOrEqual |
Returns if left is greater than or equal to right.
| |
Inequality |
Returns if the two instances are not exactly equal.
| |
LessThan |
Returns if left is less than right.
| |
LessThanOrEqual |
Returns if left is less than or equal to right.
|
Name | Description | |
---|---|---|
MaxValue |
Represents the largest possible value of GregorianDate.
Corresponds to MaxValue.
| |
MinValue |
Represents the smallest possible value of GregorianDate.
Corresponds to MinValue.
|