Delphi IsThisLeapYear 判断闰年


本文整理自网络,侵删。

 
function IsThisLeapYear(year : Word): Boolean;
begin
  Result := SysUtils.IsLeapYear(year);
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  year : integer;
begin
  year := StrToInt(Edit1.Text);
  if (IsThisLeapYear(year)) then
    ShowMessage(Edit1.Text + ' is a leap year.')
  else
    ShowMessage(Edit1.Text + ' is not a leap year.');
end;

相关阅读 >>

Delphi getprocesshandleasname 获取进程句柄

Delphi执行js

Delphi 分解时间 �cdecodedate、decodetime … decodedatetime …

Delphi调节图片亮度、色彩和饱和度的代码

Delphi结构,字符串和指针

Delphi edit中只能输入数字并且只能输入一个小数点

Delphi unigui 调用js

Delphi tfilestream流操作1

Delphi 日期字符串转换日期格式

Delphi 为richedit设置行号

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...