mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 14:46:55 +01:00
Clarify locale-safe DateFormula Evaluate inputs
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
b91443beec
commit
1794170e68
5 changed files with 88 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