procedure TForm1.FormCreate(Sender: TObject);
var
firstDay,lastDay:TDateTime;
begin
firstDay := StrToDate(FormatDateTime('yyyy-mm-1',Now)); (* 本月第一天 *)
lastDay := IncMonth(firstDay)-1; (* 本月最后一天 *)
mmo1.Lines.Add(DateTimeToStr(firstDay));
mmo1.Lines.Add(DateTimeToStr(lastDay));
end;
end.