DateTimeExtensions extension

on

Properties

dateSpecification DateSpecification
no setter
endOfWeek DateTime
Returns next 'sunday' date.
no setter
endOfWorkWeek DateTime
Returns next 'friday' date.
no setter
isToday bool
Returns if date is equal to DateTime.now() without time part.
no setter
isTomorrow bool
no setter
isWeekend bool
Returns if current date is weekend (Saturday, Sunday).
no setter
isYesterday bool
no setter
onlyTime DateTime
Retuns Date set to equatal 0.0.1900 with time part from this date.
no setter
withoutTime DateTime
Returns same date but without time part.
no setter

Methods

isAfterOrSame(DateTime other, {bool includeTime = false}) bool
Returns true if this is after os is the same as other.
isBeforeOrSame(DateTime other, {bool includeTime = false}) bool
Returns true if this is before or is the same as other.
isSameDateWithoutTime(DateTime date) bool
Returns whether this and date are equal without comparing time part.

Static Methods

endOfWeekOfNow() DateTime
Returns end of week of relative to now.
nowWithoutTime() DateTime
Returns DateTime.now() without time part.