Добавлена статья о DateOnly и TimeOnly#231
Conversation
WalkthroughДобавлены новые англоязычная и русскоязычная страницы документации о поддержке ChangesДокументация DateOnly и TimeOnly
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
pages/products/flexberry-orm/data-types/fo_date-only-time-only.en.md (1)
27-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueДобавьте пустую строку перед блоком кода.
Согласно правилу MD031, fenced code blocks должны окружаться пустыми строками. Перед
```csharpна строке 27 отсутствует пустая строка после текста "Example:" на строке 26.Аналогичная проблема присутствует на строках 62, 149, 165, 178.
📝 Предлагаемое исправление
Example: - + ```csharp🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pages/products/flexberry-orm/data-types/fo_date-only-time-only.en.md` at line 27, The Markdown in fo_date-only-time-only.en.md violates MD031 because fenced code blocks are placed directly after surrounding text without a separating blank line. Add an empty line before each affected fenced block so the ` ```csharp ` sections are surrounded by blank lines, especially after the “Example:” text and at the other flagged code block locations in the document.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pages/products/flexberry-orm/data-types/fo_date-only-time-only.en.md`:
- Around line 222-252: The Object definition example is incomplete for
cross-version compilation because the DateOnly/TimeOnly properties in MyEntity
are only declared under NET6_0_OR_GREATER. Update the example to include a
matching `#else` branch with DateTime-based BirthDate, MeetingTime, OptionalDate,
and OptionalTime properties, or simplify the snippet if manual conditional
compilation is not intended, so the MyEntity example stays valid for older
target frameworks too.
- Line 59: The description for funcSSPart is too specific to DateTime and should
be clarified for the DateOnly/TimeOnly context. Update the table entry for
funcSSPart in this documentation so it reflects TimeOnly as well, using wording
like “Seconds from DateTime/TimeOnly” or equivalent, and keep the symbol name
funcSSPart unchanged.
In `@pages/products/flexberry-orm/data-types/fo_date-only-time-only.ru.md`:
- Line 12: Fix the spacing typo in the documentation text by adding the missing
space before .NET in the sentence about earlier framework versions; update the
copy in fo_date-only-time-only.ru.md so “более ранних версий.NET” becomes “более
ранних версий .NET”.
---
Nitpick comments:
In `@pages/products/flexberry-orm/data-types/fo_date-only-time-only.en.md`:
- Line 27: The Markdown in fo_date-only-time-only.en.md violates MD031 because
fenced code blocks are placed directly after surrounding text without a
separating blank line. Add an empty line before each affected fenced block so
the ` ```csharp ` sections are surrounded by blank lines, especially after the
“Example:” text and at the other flagged code block locations in the document.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: debef5c7-e420-45d8-9d9c-4187a206aa45
📒 Files selected for processing (3)
_data/sidebars/flexberry-orm_sidebar.ymlpages/products/flexberry-orm/data-types/fo_date-only-time-only.en.mdpages/products/flexberry-orm/data-types/fo_date-only-time-only.ru.md
| |---------|----------|------------------| | ||
| | `funcDayNumber` | Day number from 0001-01-01 | Numeric | | ||
| | `funcDayOfYear` | Day of year (1-366) | Numeric | | ||
| | `funcSSPart` | Seconds from DateTime | Numeric | |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Уточните описание funcSSPart для контекста TimeOnly.
Описание "Seconds from DateTime" может сбивать с толку на странице, посвящённой DateOnly/TimeOnly. Если функция применима и к TimeOnly, стоит уточнить описание, например: "Seconds from DateTime/TimeOnly".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pages/products/flexberry-orm/data-types/fo_date-only-time-only.en.md` at line
59, The description for funcSSPart is too specific to DateTime and should be
clarified for the DateOnly/TimeOnly context. Update the table entry for
funcSSPart in this documentation so it reflects TimeOnly as well, using wording
like “Seconds from DateTime/TimeOnly” or equivalent, and keep the symbol name
funcSSPart unchanged.
| ## Object definition example | ||
|
|
||
| ```csharp | ||
| public class MyEntity : ICSSoft.STORMNET.DataObject | ||
| { | ||
| #if NET6_0_OR_GREATER | ||
| private System.DateOnly fBirthDate; | ||
| private System.TimeOnly fMeetingTime; | ||
| #else | ||
| private System.DateTime fBirthDate; | ||
| private System.DateTime fMeetingTime; | ||
| #endif | ||
|
|
||
| #if NET6_0_OR_GREATER | ||
| public virtual System.DateOnly BirthDate | ||
| { | ||
| get => fBirthDate; | ||
| set => fBirthDate = value; | ||
| } | ||
|
|
||
| public virtual System.TimeOnly MeetingTime | ||
| { | ||
| get => fMeetingTime; | ||
| set => fMeetingTime = value; | ||
| } | ||
|
|
||
| public virtual System.DateOnly? OptionalDate { get; set; } | ||
| public virtual System.TimeOnly? OptionalTime { get; set; } | ||
| #endif | ||
| } | ||
| ``` |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚖️ Poor tradeoff
Пример условной компиляции неполный для кросс-версионной совместимости.
В примере объявления объекта поля имеют ветки #if/#else/#endif для обоих таргетов (строки 227–233), а свойства объявлены только для NET6_0_OR_GREATER (строки 235–250). При компиляции для более ранних версий .NET свойства BirthDate, MeetingTime, OptionalDate, OptionalTime отсутствуют вовсе.
Если цель — показать рекомендуемый паттерн для кода, поддерживающего обе версии, следует добавить #else-ветку со свойствами типа DateTime. Если же ORM прозрачно выполняет замену, и пользователю не требуется ручная условная компиляция, пример стоит упростить.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pages/products/flexberry-orm/data-types/fo_date-only-time-only.en.md` around
lines 222 - 252, The Object definition example is incomplete for cross-version
compilation because the DateOnly/TimeOnly properties in MyEntity are only
declared under NET6_0_OR_GREATER. Update the example to include a matching `#else`
branch with DateTime-based BirthDate, MeetingTime, OptionalDate, and
OptionalTime properties, or simplify the snippet if manual conditional
compilation is not intended, so the MyEntity example stays valid for older
target frameworks too.
|
|
||
| ## Обзор | ||
|
|
||
| Типы `DateOnly` и `TimeOnly` появились в .NET 6.0. Flexberry ORM поддерживает эти типы, при этом при компиляции для более ранних версий.NET используется `DateTime` в качестве замены. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Исправьте орфографию: пропущен пробел.
«более ранних версий.NET» → «более ранних версий .NET»
📝 Исправление
-при компиляции для более ранних версий.NET используется
+при компиляции для более ранних версий .NET используется📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Типы `DateOnly` и `TimeOnly` появились в .NET 6.0. Flexberry ORM поддерживает эти типы, при этом при компиляции для более ранних версий.NET используется `DateTime` в качестве замены. | |
| Типы `DateOnly` и `TimeOnly` появились в .NET 6.0. Flexberry ORM поддерживает эти типы, при этом при компиляции для более ранних версий .NET используется `DateTime` в качестве замены. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pages/products/flexberry-orm/data-types/fo_date-only-time-only.ru.md` at line
12, Fix the spacing typo in the documentation text by adding the missing space
before .NET in the sentence about earlier framework versions; update the copy in
fo_date-only-time-only.ru.md so “более ранних версий.NET” becomes “более ранних
версий .NET”.



Summary by CodeRabbit
New Features
DateOnlyиTimeOnlyв Flexberry ORM.Documentation