C++ Builder 参考手册 ➙ System::Dateutils ➙ DayOfTheWeek
这个日期时间在所在周的第几天 (ISO 8601) / 这一天是星期几
头文件:#include <System.DateUtils.hpp>
命名空间:System::Dateutils
函数原型:
System::Word __fastcall DayOfTheWeek(const System::TDateTime AValue);
参数:
- AValue:日期时间类型变量;
返回值:
- 这个日期时间在所在周的第几天 (ISO 8601) / 这一天是星期几 (1 - 7);
1: 一周的第一天,星期一;
2: 一周的第二天,星期二;
……
7: 一周的第七天,星期日; - 可以用函数 DecodeDateWeek 得到年、这一年的第几周、这个周的第几天;
可以用函数 DecodeDateMonthWeek 得到年、月、这个月的第几周、这个周的第几天; - 注意:函数 DecodeDateFully 得到的星期几是美国习惯的,而不是 ISO 8601 国际标准,也不符合中国习惯;本文前面涉及到的其他几个函数都是 ISO 8601 国际标准的,符合中国习惯的。
相关:
- System::Dateutils::DateOf
- System::Dateutils::DateTimeToUnix
- System::Dateutils::DayOf
- System::Dateutils::DayOfTheMonth
- System::Dateutils::DayOfTheWeek
- System::Dateutils::DayOfTheYear
- System::Dateutils::DecodeDateMonthWeek
- System::Dateutils::DecodeDateTime
- System::Dateutils::DecodeDateWeek
- System::Dateutils::EncodeDateMonthWeek
- System::Dateutils::EncodeDateTime
- System::Dateutils::EncodeDateWeek
- System::Dateutils::HourOf
- System::Dateutils::HourOfTheMonth
- System::Dateutils::HourOfTheYear
- System::Dateutils::IsValidDateMonthWeek
- System::Dateutils::IsValidDateWeek
- System::Dateutils::MilliSecondOf
- System::Dateutils::MilliSecondOfTheYear
- System::Dateutils::MinuteOf
- System::Dateutils::MinuteOfTheMonth
- System::Dateutils::MinuteOfTheYear
- System::Dateutils::MonthOf
- System::Dateutils::MonthOfTheYear
- System::Dateutils::SecondOf
- System::Dateutils::SecondOfTheMonth
- System::Dateutils::SecondOfTheYear
- System::Dateutils::TimeOf
- System::Dateutils::TryEncodeDateTime
- System::Dateutils::UnixToDateTime
- System::Dateutils::WeekOfTheMonth
- System::Dateutils::WeekOfTheYear
- System::Dateutils::WeeksInYear
- System::Dateutils::YearOf
- System::Dateutils
- System::Sysutils::CurrentYear
- System::Sysutils::Date
- System::Sysutils::DecodeDate
- System::Sysutils::DecodeDateFully
- System::Sysutils::DecodeTime
- System::Sysutils::EncodeDate
- System::Sysutils::EncodeTime
- System::Sysutils::FormatDateTime
- System::Sysutils::Now
- System::Sysutils::Time
- System::Sysutils::TryEncodeDate
- System::Sysutils::TryEncodeTime
- System::Sysutils::TryStrToDate
- System::Sysutils::TryStrToDateTime
- System::Sysutils::TryStrToTime
- System::Sysutils
C++ Builder 参考手册 ➙ System::Dateutils ➙ DayOfTheWeek
网友评论