ERPConnect.AbapDate
Namespace: ERPConnect
Assembly: ERPConnectStandard20.dll
Represents an SAP date (ABAP type d, or DDIC type DATS).
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
The Julian calendar is used from 0001-01-01 to 1582-10-04. The Gregorian calendar is used from 1582-10-15. The date range from 1582-10-05 to 1582-10-14 is invalid.
Constructors
AbapDate(in ushort, in byte, in byte)
Initializes a new instance of ERPConnect.AbapDate
using a 1-based year, month and day.
Parameters
year
ushort
month
byte
day
byte
Exceptions
The date is invalid. e.g. month 13 or 29.02. in any other year than a leap year.
Properties
Day
Gets the current day in currently represented ERPConnect.AbapDate.Month
and ERPConnect.AbapDate.Year
.
Property Value
InitialValue
Gets a constant value representing the initial value (ABAP string 00000000).
Property Value
MaxValue
Gets the maximum representable date (9999-12-31).
Property Value
MinValue
Gets the minimum representable date (0001-01-01).
Property Value
Month
Gets the current month in currently represented ERPConnect.AbapDate.Year
.
Property Value
Year
Gets the currently represented year.
Property Value
Methods
IsJulianDate(in ushort, in byte, in byte)
Parameters
year
ushort
month
byte
day
byte
Returns
IsLeapYear(in ushort)
Checks whether this year is a leap year. Years before 1582 follow the Julian rule (every 4 years) for leap years, afterwards the Gregorian rule is used for leap years.
Parameters
year
ushort
Returns
Parse(in string)
Parameters
abapString
string
Returns
ToString()
Returns
TryToDateTime(out DateTime?)
Tries to convert to the corresponding System.DateTime
value.
Parameters
value
DateTime?
Returns
Remarks
The ABAP values 0001-01-01 and 0001-01-02 cannot be converted. Assuming the proleptic Julian calendar, they would correspond to 0000-12-30 and 0000-12-31, which is out of range for System.DateTime
.
UtcToday()
Gets an ERPConnect.AbapDate
representing the current date (UTC).