本文整理汇总了C++中poco::DateTime::isAM方法的典型用法代码示例。如果您正苦于以下问题:C++ DateTime::isAM方法的具体用法?C++ DateTime::isAM怎么用?C++ DateTime::isAM使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类poco::DateTime
的用法示例。
在下文中一共展示了DateTime::isAM方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DisplayDateTime
//----------------------------------------
// DisplayDateTime
//----------------------------------------
void DisplayDateTime(const Poco::DateTime& dateTime, ScopedLogMessage& msg)
{
msg.Message(Poco::format(" year = %d", dateTime.year()));
msg.Message(Poco::format(" month = %d\t(1 to 12)", dateTime.month()));
msg.Message(Poco::format(" day = %d\t(1 to 31)", dateTime.day()));
msg.Message(Poco::format(" hour = %d\t(0 to 23)", dateTime.hour()));
msg.Message(Poco::format(" minute = %d\t(0 to 59)", dateTime.minute()));
msg.Message(Poco::format(" second = %d\t(0 to 59)", dateTime.second()));
msg.Message(Poco::format(" millisecond = %d\t(0 to 999)", dateTime.millisecond()));
msg.Message(Poco::format(" microsecond = %d\t(0 to 999)", dateTime.microsecond()));
msg.Message(Poco::format(" isAM = %s\t(true or false)", std::string(dateTime.isAM() ? "true":"false")));
msg.Message(Poco::format(" isPM = %s\t(true or false)", std::string(dateTime.isPM() ? "true":"false")));
msg.Message(Poco::format(" isLeapYear = %s\t(true or false)", std::string(Poco::DateTime::isLeapYear(dateTime.year()) ? "true":"false")));
msg.Message(Poco::format(" hourAMPM = %d\t(0 to 12)", dateTime.hourAMPM()));
msg.Message(Poco::format(" dayOfWeek = %d\t(0 to 6, 0: Sunday)", dateTime.dayOfWeek()));
msg.Message(Poco::format(" dayOfYear = %d\t(1 to 366, 1: January 1)", dateTime.dayOfYear()));
msg.Message(Poco::format(" daysOfMonth = %d\t(1 to 366, 1: January 1)", Poco::DateTime::daysOfMonth(dateTime.year(), dateTime.month())));
msg.Message(Poco::format(" week = %d\t(0 to 53, 1: the week containing January 4)", dateTime.week()));
msg.Message("");
}