unit ppal;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;

type

  { TForm1 }

TForm1 = class(TForm)
  btnFecha: TButton;
  procedure btnFechaClick(Sender: TObject);
  private
   function Hoy: string;
  end;

var
  Form1: TForm1;
  Ahora: TDateTime;
implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.btnFechaClick(Sender: TObject);
begin
   Ahora := Time;
   ShowMessage('Hoy es ' + Hoy + ', ' + TimeToStr(Ahora));
end;

function TForm1.Hoy: string;
begin
  Result:=FormatDateTime('dddd, d mm yyyy', Now);
end;
end.

