Class SByteExtensions
Time-related extension methods for
Inheritance
Namespace: X10D.Time
Assembly: X10D.dll
Syntax
public static class SByteExtensions : object
Methods
| Improve this Doc View SourceDays(SByte)
Returns a
Declaration
public static TimeSpan Days(this sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | The duration, in days. |
Returns
Type | Description |
---|---|
TimeSpan | A |
FromUnixTimeMilliseconds(SByte)
Converts a Unix time expressed as the number of milliseconds that have elapsed since 1970-01-01T00:00:00Z to a
Declaration
public static DateTimeOffset FromUnixTimeMilliseconds(this sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | A Unix time, expressed as the number of milliseconds that have elapsed since 1970-01-01T00:00:00Z (January 1, 1970, at 12:00 AM UTC). For Unix times before this date, its value is negative. |
Returns
Type | Description |
---|---|
DateTimeOffset | A date and time value that represents the same moment in time as the Unix time. |
FromUnixTimeSeconds(SByte)
Converts a Unix time expressed as the number of seconds that have elapsed since 1970-01-01T00:00:00Z to a
Declaration
public static DateTimeOffset FromUnixTimeSeconds(this sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | A Unix time, expressed as the number of seconds that have elapsed since 1970-01-01T00:00:00Z (January 1, 1970, at 12:00 AM UTC). For Unix times before this date, its value is negative. |
Returns
Type | Description |
---|---|
DateTimeOffset | A date and time value that represents the same moment in time as the Unix time. |
Hours(SByte)
Returns a
Declaration
public static TimeSpan Hours(this sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | The duration, in hours. |
Returns
Type | Description |
---|---|
TimeSpan | A |
IsLeapYear(SByte)
Returns a value indicating whether the current integer, representing a year, is a leap year.
Declaration
public static bool IsLeapYear(this sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | The value whose leap year status to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if |
Milliseconds(SByte)
Returns a
Declaration
public static TimeSpan Milliseconds(this sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | The duration, in milliseconds. |
Returns
Type | Description |
---|---|
TimeSpan | A |
Minutes(SByte)
Returns a
Declaration
public static TimeSpan Minutes(this sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | The duration, in minutes. |
Returns
Type | Description |
---|---|
TimeSpan | A |
Seconds(SByte)
Returns a
Declaration
public static TimeSpan Seconds(this sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | The duration, in seconds. |
Returns
Type | Description |
---|---|
TimeSpan | A |
Ticks(SByte)
Returns a
Declaration
public static TimeSpan Ticks(this sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | The duration, in ticks. |
Returns
Type | Description |
---|---|
TimeSpan | A |
Weeks(SByte)
Returns a
Declaration
public static TimeSpan Weeks(this sbyte value)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | value | The duration, in weeks. |
Returns
Type | Description |
---|---|
TimeSpan | A |