Delphi 输入年月判断天数


本文整理自网络,侵删。

 
//需要引用dateutils;

 

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,dateutils, StdCtrls;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Edit_nian: TEdit;
    Edit_yue: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
label3.caption := inttostr(DaysInAMonth(strtoint(Edit_nian.text),strtoint(Edit_yue.text)));
end;

end.

相关阅读 >>

Delphi根据网络链接截取域名

Delphi 播放声音 采用 异步方式,比较流畅

Delphi fmx下怎么得到当前程序的路径和文件名称?

Delphi idhashmessagedigest, idhash, idglobal md5

Delphi取得网页源码内容

Delphi中怎样展开和关闭treeview的所有节点

Delphi 获取外部程序句柄与发送消息

Delphi 判断文本是否包含多个关键词之一

Delphi2007在win7系统下的日期问题

Delphi使用正则匹配网页数据

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



打赏

取消

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

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

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

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

评论

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