PhoenixmlDb.Core
XsDate
Represents an xs:date value with optional timezone and support for extended years.
#XsDate
Namespace: PhoenixmlDb.Xdm
Represents an xs:date value with optional timezone and support for extended years.
Unlike , this type preserves timezone offset information and distinguishes between "no timezone" ( is null) and a specific timezone offset. This distinction matters for XPath date comparisons and timezone-related functions like fn:adjust-date-to-timezone(). Extended years: Supports years outside the .NET 1-9999 range, including year 0 and negative years in the proleptic Gregorian calendar. See .
#Constructors
##ctor(DateOnly,Nullable<TimeSpan>)
Represents an xs:date value with optional timezone and support for extended years.
Unlike , this type preserves timezone offset information and distinguishes between "no timezone" ( is null) and a specific timezone offset. This distinction matters for XPath date comparisons and timezone-related functions like fn:adjust-date-to-timezone(). Extended years: Supports years outside the .NET 1-9999 range, including year 0 and negative years in the proleptic Gregorian calendar. See .
#Properties
| Name | Description |
|---|---|
EffectiveYear
|
The effective year, using ExtendedYear if available, otherwise Date.Year. |
ExtendedYear
|
Extended year for dates outside the .NET DateOnly range (years < 1 or > 9999). When non-null, this is the true year; Date.Year is clamped for month/day storage. |
#Methods
#AddDays(Int64)
Adds (or subtracts, when negative) a number of days using a proleptic day-number conversion so that crossings below year 1 are handled uniformly.
#AddMonths(Int64)
Adds (or subtracts, when negative) a number of months using proleptic-Gregorian month arithmetic on the effective year, clamping the day to the new month's length.
#ToUtcTicks
Converts this date to UTC ticks for comparison, using midnight as the time component. Falls back to year comparison for extended dates.