mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-07 15:46:55 +01:00
Clarify locale-safe DateFormula Evaluate inputs (#193)
* Clarify locale-safe DateFormula Evaluate inputs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Normalize DateFormula article sections Keep the analyzer-gap explanation in Description and its scoped probe evidence in References, without a novel Validation section. Normative guidance and fixtures are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
dd833133e0
commit
d38377b85e
5 changed files with 84 additions and 5 deletions
|
|
@ -0,0 +1,18 @@
|
|||
codeunit 50101 "Good Review Scheduling"
|
||||
{
|
||||
procedure NextReviewDate(Interval: DateFormula; ReferenceDate: Date): Date
|
||||
begin
|
||||
if Format(Interval) = '' then
|
||||
Evaluate(Interval, '<1W>');
|
||||
|
||||
exit(CalcDate(Interval, ReferenceDate));
|
||||
end;
|
||||
|
||||
procedure NextReviewFromUserInput(UserFormulaText: Text; ReferenceDate: Date): Date
|
||||
var
|
||||
Interval: DateFormula;
|
||||
begin
|
||||
Evaluate(Interval, UserFormulaText);
|
||||
exit(NextReviewDate(Interval, ReferenceDate));
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue