mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-08 10:59:10 +02:00
* IsSamemonth analog to IsSameDay. Mantis #19876
git-svn-id: trunk@18950 -
This commit is contained in:
parent
3383db43cd
commit
0cc60e05f2
@ -111,6 +111,7 @@ Function Yesterday: TDateTime;
|
||||
Function Tomorrow: TDateTime;
|
||||
Function IsToday(const AValue: TDateTime): Boolean;
|
||||
Function IsSameDay(const AValue, ABasis: TDateTime): Boolean;
|
||||
function IsSameMonth(const Avalue, ABasis: TDateTime): Boolean;
|
||||
Function PreviousDayOfWeek (DayOfWeek : Word) : Word;
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
@ -618,6 +619,12 @@ begin
|
||||
Result:=(D>=0) and (D<1);
|
||||
end;
|
||||
|
||||
function IsSameMonth(const Avalue, ABasis: TDateTime): Boolean;
|
||||
begin
|
||||
result:=( YearOf(Avalue) = YearOf(Abasis) );
|
||||
result:=result and ( MonthOf(AValue) = MonthOf(ABasis) );
|
||||
end;
|
||||
|
||||
const
|
||||
DOWMap: array [1..7] of Word = (7, 1, 2, 3, 4, 5, 6);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user