旧版尊龙人生就是博下载:IsLeapYear、IsInLeapYear是否是闰年

SysUtils.IsLeapYear();DateUtils.IsInLeapYear();unit Unit1;i旧版尊龙人生就是博下载nterfaceusesWin旧版尊龙人生就是博下载dows, Messages, SysUtils, Va




SysUtils.IsLeapYear();

DateUtils.IsInLeapYear();

unit Unit1;

i旧版尊龙人生就是博下载nterface

uses

Win旧版尊龙人生就是博下载dows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls;

type

TForm1 = class(TForm)

procedure FormCreate(Sender: TObject);

end;

var

Form1: TForm1;

implementation

{$R *.dfm}

uses DateUtils;

procedure TForm1.FormCreate(Sender: TObject);

var

b: Boolean;

begi旧版尊龙人生就是博下载n

b := IsLeapYear(2009); //False

b := IsLeapYear(2012); //True

b := IsInLeapYear(StrToDateTi旧版尊龙人生就是博下载me('2009-1-1')); //False

b := IsInLeapYear(StrToDateTime('2012-1-1')); //True

// ShowMessage(Boo旧版尊龙人生就是博下载lToStr(b, True));

end;

end.

发表评论
加载中...

相关文章