Rename `DateTimeParts::Millisecond` to `…::SubSecond`
We're currently just tracking whether the second has a fraction so this is more fitting.
This commit is contained in:
parent
f20d596785
commit
5fe03c23a2
|
@ -150,7 +150,7 @@ enum class DateTimeParts : std::uint64_t {
|
||||||
Hour = (1 << 3), /**< the hour is present */
|
Hour = (1 << 3), /**< the hour is present */
|
||||||
Minute = (1 << 4), /**< the minute is present */
|
Minute = (1 << 4), /**< the minute is present */
|
||||||
Second = (1 << 5), /**< the second is present */
|
Second = (1 << 5), /**< the second is present */
|
||||||
Millisecond = (1 << 6), /**< the millisecond is present */
|
SubSecond = (1 << 6), /**< the second contains a fractional part */
|
||||||
DeltaHour = (1 << 7), /**< the timezone-delta hour is present */
|
DeltaHour = (1 << 7), /**< the timezone-delta hour is present */
|
||||||
DeltaMinute = (1 << 8), /**< the timezone-delta minute is present */
|
DeltaMinute = (1 << 8), /**< the timezone-delta minute is present */
|
||||||
};
|
};
|
||||||
|
|
|
@ -259,7 +259,7 @@ void ChronoTests::testDateTimeExpression()
|
||||||
expr = DateTimeExpression::fromIsoString("1-1-1T0:0:0.0");
|
expr = DateTimeExpression::fromIsoString("1-1-1T0:0:0.0");
|
||||||
CPPUNIT_ASSERT_EQUAL(DateTime(), expr.value);
|
CPPUNIT_ASSERT_EQUAL(DateTime(), expr.value);
|
||||||
CPPUNIT_ASSERT_EQUAL(TimeSpan(), expr.delta);
|
CPPUNIT_ASSERT_EQUAL(TimeSpan(), expr.delta);
|
||||||
CPPUNIT_ASSERT_EQUAL(parts |= DateTimeParts::Millisecond, expr.parts);
|
CPPUNIT_ASSERT_EQUAL(parts |= DateTimeParts::SubSecond, expr.parts);
|
||||||
expr = DateTimeExpression::fromIsoString("1-1-1T0:0:0.0+0");
|
expr = DateTimeExpression::fromIsoString("1-1-1T0:0:0.0+0");
|
||||||
CPPUNIT_ASSERT_EQUAL(DateTime(), expr.value);
|
CPPUNIT_ASSERT_EQUAL(DateTime(), expr.value);
|
||||||
CPPUNIT_ASSERT_EQUAL(TimeSpan(), expr.delta);
|
CPPUNIT_ASSERT_EQUAL(TimeSpan(), expr.delta);
|
||||||
|
@ -300,7 +300,7 @@ void ChronoTests::testDateTimeExpression()
|
||||||
expr = DateTimeExpression::fromString("1/1/1 0:0:0.0");
|
expr = DateTimeExpression::fromString("1/1/1 0:0:0.0");
|
||||||
CPPUNIT_ASSERT_EQUAL(DateTime(), expr.value);
|
CPPUNIT_ASSERT_EQUAL(DateTime(), expr.value);
|
||||||
CPPUNIT_ASSERT_EQUAL(TimeSpan(), expr.delta);
|
CPPUNIT_ASSERT_EQUAL(TimeSpan(), expr.delta);
|
||||||
CPPUNIT_ASSERT_EQUAL(parts |= DateTimeParts::Millisecond, expr.parts);
|
CPPUNIT_ASSERT_EQUAL(parts |= DateTimeParts::SubSecond, expr.parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Reference in New Issue