This service is available via Telligent.Evolution.Extensibility.Apis.Get<Telligent.Evolution.Extensibility.Api.Version1.IDate>()
and is defined in Telligent.Evolution.Platform.dll
Properties
Name | Type | Description | Default | Options |
---|---|---|---|---|
CurrentUniversalTime | DateTime | The current date and time in univeral time(Utc) with a DateTimeKind of Utc. | ||
CurrentUserTime | DateTime | The current date and time in the accessing user's timezone with a DateTimeKind of Unspecifed. |
Methods
bool Compare(DateTime date1, string operation, DateTime date2);
Compares the first input date with the second based on the provide operation value. Valid operation values are Valid values are 'EqualTo', 'NotEqualTo', 'LaterThan', 'LaterThanOrEqual', 'EarlierThan', 'EarlierThanOrEqualTo'. Both dates will be converted to universal(utc) time based on their current DateTimeKind values before comparison.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
date1 | DateTime | Date1 | Required | ||
operation | string | Operation | Required | ||
date2 | DateTime | Date2 | Required |
Return Type
bool
DateTime ToUniversalTime(DateTime inDate);
Converts the input date to universal(Utc) time if the input date's DateTimeKind is Local(Server time) or Unspecified(User time), otherwise no conversion is made. The output DateTimeKind wil be Utc.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
inDate | DateTime | In Date | Required |
Return Type
DateTime
DateTime ToUserTime(DateTime inDate);
Converts the input date to the accessing users local timezone if the input date's DateTimeKind is Local(Server time) or Utc, otherwise no conversion is made. The output DateTimeKind wil be Unspecfied.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
inDate | DateTime | In Date | Required |
Return Type
DateTime