DateTimeProvider Class
A date and time provider, that can be used to simulate a certain date or time
When no mock date/time is set, it returns the datetime values from the system,
otherwise the set value. The mock values does not change or reflect time passing.
Namespace: MoreDateTimeAssembly: MoreDateTime (in MoreDateTime.dll) Version: 1.3.0
Dim instance As DateTimeProvider
No code example is currently available or this language may not be supported.
- Inheritance
- Object DateTimeProvider
- Implements
- IDateTimeProvider
Current
|
Gets the current DateTimeProvider
|
Now
|
Gets the current DateTime (or the mock value if set)
|
Today
|
Gets the date part of the current DateTime with the time set to 00:00:00 (or the mock value if set)
|
UtcNow
|
Gets the current UTC DateTime (or the mock value if set)
|
UtcToday
|
Gets the date part of the current UTC DateTime with the time set to 00:00:00 (or the mock value if set)
|
SetMockDateTime
|
Sets the mock date time. This substitutes delivering the current date time from the system. Use for testing and verification.
|
SetUtcHandling
|
Sets how UTC is handled by the Now property, if true then Now is returning UTC time
|