-
Notifications
You must be signed in to change notification settings - Fork 0
Class Clock
Kristian Virtanen edited this page Oct 28, 2024
·
11 revisions
The Clock class provides access to the system's date and time, offering properties to retrieve current time, date, and related information in different formats.
-
Description: Stores the last error message, if any operation fails, including a timestamp in
yyyy-MM-dd HH:mm:ss
format. -
Example:
"2024-10-16 14:30:00: Example error message"
- Differences from orig. SB: Not available at original SB.
-
Description: Returns the current system time as a string in
HH:mm:ss
format or another format, if set withClock.TimeFormat
. -
Example:
"14:30:45"
-
Differences from orig. SB: Original uses system time format, where as SBOE uses format
HH:mm:ss
as default.
-
Description: Get's or set's the time format used with Clock.Time. By default, Clock.Time uses
HH:mm:ss
format. -
Example: Let's ignore seconds.
Clock.TimeFormat = "HH:mm"
- Differences from orig. SB: Not available at original SB.
- More about time and date formats at: https://learn.microsoft.com/en-us/dotnet/standard/base-types/formatting-types
-
Description: Returns the current system date as a string in
yyyy-MM-dd
format or another format, if set withClock.TimeFormat
. -
Example:
"2024-1+.28"
-
Differences from orig. SB: Original uses system date format, where as SBOE uses format
yyyy-MM-dd
as default.
-
Description: Get's or set's the date format used with Clock.Date. By default, Clock.Date uses
yyyy-MM-dd
format. -
Example: Let's ignore date.
Clock.DateFormat = "yyyy-MM"
- Differences from orig. SB: Not available at original SB.
- More about time and date formats at: https://learn.microsoft.com/en-us/dotnet/standard/base-types/formatting-types
- Description: Returns the current system year as an integer.
-
Example:
2024
- Differences from orig. SB: none.
- Description: Returns the current system month as an integer.
-
Example:
10
- Differences from orig. SB: none.
- Description: Returns the current day of the month as an integer.
-
Example:
16
- Differences from orig. SB: none.
- Description: Returns the current day of the week as a string.
-
Example:
"Wednesday"
- Differences from orig. SB: none.
- Description: Returns the current system hour as an integer.
-
Example:
14
- Differences from orig. SB: none.
- Description: Returns the current system minute as an integer.
-
Example:
30
- Differences from orig. SB: none.
- Description: Returns the current system second as an integer.
-
Example:
45
- Differences from orig. SB: none.
- Description: Returns the current system millisecond as an integer.
-
Example:
123
- Differences from orig. SB: none.
- Description: Returns the number of milliseconds that have elapsed since the program started.
-
Example:
5000
- Differences from orig. SB: Not available in original SB.
- Description: Returns the number of milliseconds that have elapsed since January 1, 2024 (UTC).
-
Example:
2000000000
- Differences from orig. SB: Original returned milliseconds from the start of year 1900.