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 获取计算机名称 函数

Delphi winapi: windowfrompoint- 获取指定点所在窗口的句柄

Delphi获取java时间戳

Delphi idhttp登录网站教程代码

Delphi tstringlist 文本文件拼接

Delphi timage 加上滚动条方法

Delphi listview排序

Delphi 的运算符列表

Delphi 用 superobject 解析淘宝上的 json 数据

Delphi sysutils.lastdelimiter - 判断一个字符串在另一个字符串中最后出现的位置

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



打赏

取消

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

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

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

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

评论

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