unit zdk_02;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls, Buttons, Menus, jpeg
  , DateUtils, ComCtrls, XPMan;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    BitBtn1: TBitBtn;
    Image1: TImage;
    Image2: TImage;
    Image3: TImage;
    Image4: TImage;
    Image5: TImage;
    Image6: TImage;
    Image7: TImage;
    Image8: TImage;
    Image9: TImage;
    Image10: TImage;
    Image11: TImage;
    Image12: TImage;
    DateTimePicker1: TDateTimePicker;
    XPManifest1: TXPManifest;
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.BitBtn1Click(Sender: TObject);
var
  tgl : TDate;
  thn : Integer;
begin
  DateSeparator := '-';
  ShortDateFormat := 'dd/MM/yyyy';

  Image1.Visible := False;  Image2.Visible := False;  Image3.Visible := False;
  Image4.Visible := False;  Image5.Visible := False;  Image6.Visible := False;
  Image7.Visible := False;  Image8.Visible := False;  Image9.Visible := False;
  Image10.Visible := False; Image11.Visible := False; Image12.Visible := False;

  tgl := DateTimePicker1.Date;
  thn := YearOf(tgl);

  If (tgl >= StrToDate('21-01-'+IntToStr(thn))) and
     (tgl <= StrToDate('19-02-'+IntToStr(thn))) then
  begin
    Image1.Visible := True;
  end
  else
  If (tgl >= StrToDate('20-02-'+IntToStr(thn))) and
     (tgl <= StrToDate('20-03-'+IntToStr(thn))) then
  begin
    Image2.Visible := True;
  end
  else
  If (tgl >= StrToDate('21-03-'+IntToStr(thn))) and
     (tgl <= StrToDate('19-04-'+IntToStr(thn))) then
  begin
    Image3.Visible := True;
  end
  else
  If (tgl >= StrToDate('20-04-'+IntToStr(thn))) and
     (tgl <= StrToDate('20-05-'+IntToStr(thn))) then
  begin
    Image4.Visible := True;
  end
  else
  If (tgl >= StrToDate('21-05-'+IntToStr(thn))) and
     (tgl <= StrToDate('21-06-'+IntToStr(thn))) then
  begin
    Image5.Visible := True;
  end
  else
  If (tgl >= StrToDate('22-06-'+IntToStr(thn))) and
     (tgl <= StrToDate('22-07-'+IntToStr(thn))) then
  begin
    Image6.Visible := True;
  end
  else
  If (tgl >= StrToDate('23-07-'+IntToStr(thn))) and
     (tgl <= StrToDate('23-08-'+IntToStr(thn))) then
  begin
    Image7.Visible := True;
  end
  else
  If (tgl >= StrToDate('24-08-'+IntToStr(thn))) and
     (tgl <= StrToDate('22-09-'+IntToStr(thn))) then
  begin
    Image8.Visible := True;
  end
  else
  If (tgl >= StrToDate('23-09-'+IntToStr(thn))) and
     (tgl <= StrToDate('23-10-'+IntToStr(thn))) then
  begin
    Image9.Visible := True;
  end
  else
  If (tgl >= StrToDate('24-10-'+IntToStr(thn))) and
     (tgl <= StrToDate('22-11-'+IntToStr(thn))) then
  begin
    Image10.Visible := True;
  end
  else
  If (tgl >= StrToDate('23-11-'+IntToStr(thn))) and
     (tgl <= StrToDate('21-12-'+IntToStr(thn))) then
  begin
    Image11.Visible := True;
  end
  else
  If (tgl < StrToDate('21-01-'+IntToStr(thn))) or
     (tgl > StrToDate('21-12-'+IntToStr(thn))) then
  begin
    Image12.Visible := True;
  end;
end;

end.
