 | ITimeService Interface |
A service providing the current date or time.
Very useful to decouple code from the static
DateTime methods, to make code that has dependencies to date or time testable.
Namespace: TomsToolbox.EssentialsAssembly: TomsToolbox.Essentials (in TomsToolbox.Essentials.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntaxpublic interface ITimeService
Public Interface ITimeService
The ITimeService type exposes the following members.
Properties | Name | Description |
---|
 | Now |
Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time.
|
 | Today |
Gets a DateTime object that is set to today's date, with the time component set to 00:00:00.
|
 | UtcNow |
Gets a DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
|
Top
See Also