您的位置:首页 > 编程语言 > Delphi

Delphi中本年、本月、本周第一天和最后一天

2020-02-15 18:17 645 查看

uses DateUtils;

function StartOfTheYear(const AValue: TDateTime): TDateTime;
function EndOfTheYear(const AValue: TDateTime): TDateTime;
function StartOfAYear(const AYear: Word): TDateTime;
function EndOfAYear(const AYear: Word): TDateTime;

function StartOfTheMonth(const AValue: TDateTime): TDateTime;
function EndOfTheMonth(const AValue: TDateTime): TDateTime;
function StartOfAMonth(const AYear, AMonth: Word): TDateTime;
function EndOfAMonth(const AYear, AMonth: Word): TDateTime;

function StartOfTheWeek(const AValue: TDateTime): TDateTime;           {ISO 8601}
function EndOfTheWeek(const AValue: TDateTime): TDateTime;             {ISO 8601}
function StartOfAWeek(const AYear, AWeekOfYear: Word;                  {ISO 8601}
   const ADayOfWeek: Word = 1): TDateTime;
function EndOfAWeek(const AYear, AWeekOfYear: Word;                    {ISO 8601}
   const ADayOfWeek: Word = 7): TDateTime;

转载于:https://www.cnblogs.com/Mr-Xia/archive/2011/09/07/2169919.html

  • 点赞
  • 收藏
  • 分享
  • 文章举报
aaaq1231 发布了0 篇原创文章 · 获赞 0 · 访问量 316 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: