Skip to content

Commit 1cdf32f

Browse files
authored
Document DateOnly.DayNumber translations (#374)
See npgsql/efcore.pg#3333
1 parent 586ea15 commit 1cdf32f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

conceptual/EFCore.PG/mapping/translations.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ dateTime.Second | [date_part('
8282
dateTime.Year | [date_part('year', dateTime)::INT](https://www.postgresql.org/docs/current/functions-datetime.html) |
8383
dateTime.ToUniversalTime | [dateTime::timestamptz](https://www.postgresql.org/docs/current/datatype-datetime.html#id-1.5.7.13.18.7) | Added in 6.0
8484
dateTime.ToLocalTime | [dateTime::timestamp](https://www.postgresql.org/docs/current/datatype-datetime.html#id-1.5.7.13.18.7) | Added in 6.0
85+
dateOnly.DayNumber | [dateOnly - DATE '0001-01-01'](https://www.postgresql.org/docs/current/functions-datetime.html) | Added in 9.0
86+
DateOnly.FromDayNumber(x) | [DATE '0001-01-01' + x](https://www.postgresql.org/docs/current/functions-datetime.html) | Added in 9.0
87+
dateOnly1.DayNumber - dateOnly2.DayNumber | [dateOnly1 - dateOnly2](https://www.postgresql.org/docs/current/functions-datetime.html) | Added in 9.0
8588
dateTimeOffset.DateTime | [dateTimeOffset AT TIME ZONE 'UTC'](https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-ZONECONVERT) | Added in 6.0
8689
dateTimeOffset.UtcDateTime | No PG operation (.NET-side conversion from DateTimeOffset to DateTime only) | Added in 6.0
8790
dateTimeOffset.LocalDateTime | [dateTimeOffset::timestamp](https://www.postgresql.org/docs/current/datatype-datetime.html#id-1.5.7.13.18.7) | Added in 6.0

conceptual/EFCore.PG/release-notes/9.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Thanks to [@ChrisJollyAU](https://github.com/ChrisJollyAU) and [@Timovzl](https:
6060
## Other new features
6161

6262
* Translate `array.Where(i => i != x)` to `array_remove(array, x)`
63+
* Translate `DateOnly.DayNumber`, `DateOnly.FromDayNumber()` and simplify `dateOnly1.DayNumber - dateOnly2.DayNumber` to `dateOnly1 - dateOnly2`.
6364

6465
See the [9.0.0 milestone](https://github.com/npgsql/efcore.pg/milestone/61?closed=1) for the full list of Npgsql EF provider issues.
6566

0 commit comments

Comments
 (0)