TimestampExtension extension
Extension methods on DateTime providing operator overloads and safe timestamp conversion.
final now = DateTime.now();
final later = now + Duration(hours: 1);
print(later > now); // true
final safeMs = now.safeMillisecondsSinceEpoch;
- on
Properties
- safeMillisecondsSinceEpoch → int
-
Available on DateTime, provided by the TimestampExtension extension
Milliseconds since the Unix epoch, adjusted to avoid negative values.no setter
Operators
-
operator +(
Duration duration) → DateTime -
Available on DateTime, provided by the TimestampExtension extension
Returns a new DateTime offset byduration. -
operator -(
Duration duration) → DateTime -
Available on DateTime, provided by the TimestampExtension extension
Returns a new DateTime offset backward byduration. -
operator <(
DateTime other) → bool -
Available on DateTime, provided by the TimestampExtension extension
Whether this DateTime is strictly beforeother. -
operator <=(
DateTime other) → bool -
Available on DateTime, provided by the TimestampExtension extension
Whether this DateTime is at or beforeother. -
operator >(
DateTime other) → bool -
Available on DateTime, provided by the TimestampExtension extension
Whether this DateTime is strictly afterother. -
operator >=(
DateTime other) → bool -
Available on DateTime, provided by the TimestampExtension extension
Whether this DateTime is at or afterother.