![]() |
Energy Core Library
|
Classes | |
| class | Duration |
| class | Interval |
Public Member Functions | |
| bool | IsLeapYear (int year) |
| Sample subroutine to calculate if a year is a leap year. More... | |
Static Public Member Functions | |
| static double | GetUnixTime (DateTime stamp) |
| Return time as unix time More... | |
| static DateTime | GetDateTime (double unix) |
| Return unix time as DateTime More... | |
| static double | GetUnixTime (DateTime stamp, int yearZero) |
| Return time as unix time More... | |
| static DateTime | GetDateTime (double unix, int yearZero) |
| Return unix time as DateTime More... | |
| static string | GetStampString (DateTime? stamp) |
| Represent DateTime as simplified ISO date and time string, i.e. "2016-02-23 22:34:10" More... | |
| static string | GetDateString (DateTime? stamp) |
| Represent DateTime as simplified ISO date string, i.e. "2016-02-23" More... | |
| static string | GetTimeString (DateTime? stamp) |
| Represent DateTime as simplified ISO time string, i.e. "22:39:07.350" More... | |
| static string | GetTimeString (TimeSpan? span) |
| Represent TimeSpan as simplified ISO time string with total hours, like "01:07.350", or "123:01:02" More... | |
| static string | GetISO8601 (DateTime? stamp) |
| Represent date and time strictly according to ISO 8601 standard with "T" for time, "Z" for UTC and "+/-" for time zone. More... | |
| static string | GetZoneString (DateTime? stamp) |
| Represent date and time as ISO readable format with zone setting, like "2016-03-02 12:00:01.340 +01:00". If day is not set (equal to "0001-01-01", only time will be returned. Milliseconds are optional. More... | |
| static DateTime | Parse (string text) |
| Parse stamp string More... | |
| static DateTime | Truncate (DateTime dateTime, int precision) |
| Truncate DateTime to desired decimal precision of seconds More... | |
| static DateTime | Truncate (DateTime dateTime) |
| Truncate DateTime to whole seconds More... | |
| static TimeSpan | Truncate (TimeSpan timeSpan, int precision) |
| Truncate TimeSpan to desired decimal precision of seconds More... | |
| static DateTime | Round (DateTime dateTime, int precision) |
| Round DateTime to desired decimal precision of seconds More... | |
| static DateTime | Round (DateTime dateTime) |
| Round DateTime to whole seconds More... | |
| static TimeSpan | Round (TimeSpan timeSpan, int precision) |
| Round TimeSpan to desired decimal precision of seconds More... | |
| static DateTime | SetDate (DateTime? value, int year, int month, int day) |
| static DateTime | SetDate (DateTime value, int year, int month, int day) |
Static Public Attributes | |
| static readonly TimeSpan | Midday = TimeSpan.FromHours(12) |
Properties | |
| static string | CurrentTime [get] |
| Return current time in 24h/ms format, i.e. "12:33:15.176" More... | |
| static string | CurrentTimeShort [get] |
| Return current time in 24h/ms format, i.e. "12:33:15" More... | |
| static string | CurrentTimeMilliseconds [get] |
| Return current time in 24h/ms format, i.e. "12:33:15.123" More... | |
| static string | CurrentTimeMicroseconds [get] |
| Return current time in 24h/ms format, i.e. "12:33:15.123456" More... | |
| static string | CurrentTimeUtc [get] |
| Return current time in 24h/ms format, i.e. "12:33:15.176" More... | |
| static string | CurrentUtcTimeShort [get] |
| Return current time in 24h/ms format, i.e. "12:33:15" More... | |
| static string | CurrentTimeUtcMilliseconds [get] |
| Return current time in 24h/ms format, i.e. "12:33:15.123" More... | |
| static string | CurrentTimeUtcMicroseconds [get] |
| Return current time in 24h/ms format, i.e. "12:33:15.123456" More... | |
| static double | CurrentUnixTime [get] |
| Return current time in unix time format, i.e. 1461477755.353 More... | |
| static Regex | DateRegex [get] |
| Singleton More... | |
| static Regex | TimeRegex [get] |
| Singleton More... | |
Date and time
|
static |
Represent DateTime as simplified ISO date string, i.e. "2016-02-23"
| stamp | DateTime? |
|
static |
Return unix time as DateTime
| unix | Unix time |
|
static |
Return unix time as DateTime
| unix | Unix time |
| yearZero | Year of zero value, 1970 for unix |
|
static |
Represent date and time strictly according to ISO 8601 standard with "T" for time, "Z" for UTC and "+/-" for time zone.
| stamp |
|
static |
Represent DateTime as simplified ISO date and time string, i.e. "2016-02-23 22:34:10"
| stamp | DateTime? |
|
static |
Represent DateTime as simplified ISO time string, i.e. "22:39:07.350"
| stamp | DateTime? |
|
static |
Represent TimeSpan as simplified ISO time string with total hours, like "01:07.350", or "123:01:02"
| span | TimeSpan? |
|
static |
Return time as unix time
| stamp |
|
static |
Return time as unix time
| stamp | |
| yearZero | Year of zero value, 1970 for unix |
|
static |
| bool Energy.Base.Clock.IsLeapYear | ( | int | year | ) |
Sample subroutine to calculate if a year is a leap year.
| year | Year |
|
static |
Parse stamp string
| text |
|
static |
Round DateTime to desired decimal precision of seconds
| dateTime | |
| precision |
|
static |
Round DateTime to whole seconds
| dateTime |
|
static |
Round TimeSpan to desired decimal precision of seconds
| timeSpan | |
| precision |
|
static |
|
static |
|
static |
Truncate DateTime to desired decimal precision of seconds
| dateTime | |
| precision |
|
static |
Truncate DateTime to whole seconds
| dateTime |
|
static |
Truncate TimeSpan to desired decimal precision of seconds
| timeSpan | |
| precision |
|
static |
|
staticget |
Return current time in 24h/ms format, i.e. "12:33:15.176"
|
staticget |
Return current time in 24h/ms format, i.e. "12:33:15.123456"
|
staticget |
Return current time in 24h/ms format, i.e. "12:33:15.123"
|
staticget |
Return current time in 24h/ms format, i.e. "12:33:15"
|
staticget |
Return current time in 24h/ms format, i.e. "12:33:15.176"
|
staticget |
Return current time in 24h/ms format, i.e. "12:33:15.123456"
|
staticget |
Return current time in 24h/ms format, i.e. "12:33:15.123"
|
staticget |
Return current time in unix time format, i.e. 1461477755.353
|
staticget |
Return current time in 24h/ms format, i.e. "12:33:15"
|
staticget |
Singleton
|
staticget |
Singleton