美文网首页
DaysInMonth - C++ Builder

DaysInMonth - C++ Builder

作者: 玄坴 | 来源:发表于2022-07-09 10:28 被阅读0次

C++ Builder 参考手册System::DateutilsDaysInMonth


这个日期所在的月份一共有多少天

头文件:#include <System.DateUtils.hpp>
命名空间:System::Dateutils
函数原型:

System::Word __fastcall DaysInMonth(const System::TDateTime AValue);

参数:

  • AValue:日期时间;

返回值:

  • 参数 AValue 所在的月份有几天,28 - 31;
    • 大月:1、3、5、7、8、10、12 月 31 天;
    • 小月:4、6、9、11 月 30 天;
    • 2 月:平年 2 月 28 天,闰年 2 月 29 天;
  • 函数 DaysInMonth 和 DaysInAMonth 比较:
    • DaysInMonth 参数是日期时间类型变量;
    • DaysInAMonth 参数是整数型变量:年、月;
    这两个函数的年、月相同,返回值就相同。

相关:


C++ Builder 参考手册System::DateutilsDaysInMonth

相关文章

网友评论

      本文标题:DaysInMonth - C++ Builder

      本文链接:https://www.haomeiwen.com/subject/laeovrtx.html