Delphi 获取任意月份总共有多少天数


本文整理自网络,侵删。

 
uses DateUtils;
方法1:
function DaysInAMonth(const AYear, AMonth: Word): Word;

 

方法2:

function GetDays(Year, Month): Word;
begin
Result := MonthDays[IsLeapYear(Year), Month];
end;

Word 相当于 integer 

相关阅读 >>

Delphi编写系统服务

Delphi用邻域平均法对图像进行平滑处理

Delphi逐个读取access中的数据

Delphi中的instrrev函数(倒找文本)

Delphi 取得当前进程占用内存及线程数

Delphi firemonkey app 如何获得当前系统语言设置

Delphi修改资源文件的代码

Delphi中单独编译pas生成dcu文件

Delphi xe 关闭android应用

Delphi如何获取硬盘所有的分区容量

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



打赏

取消

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

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

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

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

评论

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