本文整理汇总了C++中DateComponents::setMillisecondsSinceEpochForMonth方法的典型用法代码示例。如果您正苦于以下问题:C++ DateComponents::setMillisecondsSinceEpochForMonth方法的具体用法?C++ DateComponents::setMillisecondsSinceEpochForMonth怎么用?C++ DateComponents::setMillisecondsSinceEpochForMonth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DateComponents
的用法示例。
在下文中一共展示了DateComponents::setMillisecondsSinceEpochForMonth方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: serializeWithMilliseconds
String MonthInputType::serializeWithMilliseconds(double value) const
{
DateComponents date;
if (!date.setMillisecondsSinceEpochForMonth(value))
return String();
return serializeWithComponents(date);
}
示例2: defaultValueForStepDown
int DateTimeYearFieldElement::defaultValueForStepDown() const
{
double current = currentTimeMS();
double utcOffset = calculateUTCOffset();
double dstOffset = calculateDSTOffset(current, utcOffset);
int offset = static_cast<int>((utcOffset + dstOffset) / msPerMinute);
current += offset * msPerMinute;
DateComponents date;
date.setMillisecondsSinceEpochForMonth(current);
return date.fullYear();
}
示例3: currentFullYear
static int currentFullYear()
{
double current = currentTimeMS();
double utcOffset = calculateUTCOffset();
double dstOffset = calculateDSTOffset(current, utcOffset);
int offset = static_cast<int>((utcOffset + dstOffset) / msPerMinute);
current += offset * msPerMinute;
DateComponents date;
date.setMillisecondsSinceEpochForMonth(current);
return date.fullYear();
}
示例4: defaultValueForStepUp
Decimal MonthInputType::defaultValueForStepUp() const
{
double current = currentTimeMS();
double utcOffset = calculateUTCOffset();
double dstOffset = calculateDSTOffset(current, utcOffset);
int offset = static_cast<int>((utcOffset + dstOffset) / msPerMinute);
current += offset * msPerMinute;
DateComponents date;
date.setMillisecondsSinceEpochForMonth(current);
double months = date.monthsSinceEpoch();
ASSERT(std::isfinite(months));
return Decimal::fromDouble(months);
}
示例5: currentFullYear
static int currentFullYear()
{
DateComponents date;
date.setMillisecondsSinceEpochForMonth(convertToLocalTime(currentTimeMS()));
return date.fullYear();
}