unit Zdk2;

interface

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

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

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.bbtn_CariClick(Sender: TObject);
var
  tgl : TDate;
  sThn,sThn1 : string;
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 := Dtp.Date;
 sThn := IntToStr(YearOf(tgl));
 sThn1 := IntToStr(YearOf(tgl)+1);

 If (tgl >= StrToDate('21-01-'+sThn)) and (tgl <= StrToDate('19-02'+sThn)) then
 begin
   Image1.Visible := True;
 end
 else

  If (tgl >= StrToDate('20-02-'+sThn)) and (tgl <= StrToDate('20-03'+sThn)) then
 begin
   Image1.Visible := True;
 end
 else
 If (tgl >= StrToDate('21-03-'+sThn)) and (tgl <= StrToDate('19-04-'+sThn)) then
 begin
   Image1.Visible := True;
 end
 else
 If (tgl >= StrToDate('20-05-'+sThn)) and (tgl <= StrToDate('19-06-'+sThn)) then
 begin
   Image1.Visible := True;
 end
 else
 If (tgl >= StrToDate('22-12-'+sThn)) and (tgl <= StrToDate('20-01-'+sThn1)) then
 begin
   Image1.Visible := True;
 end;



end;

end.
