美文网首页
DaysInAMonth - C++ Builder

DaysInAMonth - C++ Builder

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

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


    这个某年的某个月份一共有多少天

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

    System::Word __fastcall DaysInAMonth(
        const System::Word AYear,
        const System::Word AMonth);
    

    参数:

    • AYear:年,1 - 9999;
    • AMonth:月,1 - 12;

    返回值:

    • 参数 AYear 年 AMonth 月份一共几天,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::DateutilsDaysInAMonth

    相关文章

      网友评论

          本文标题:DaysInAMonth - C++ Builder

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