Represents a date time handler class. Date 1 and date 2 use for synconize date time with another system.
More...
|
static void | Initialize (DateTime date) |
| Initializes the date time syncronization.
|
|
static DateTime | Now () |
| Now of date time.
|
|
static DateTime | Today () |
| Returns the current date without time.
|
|
static string | GetFullTimeToString () |
| Returns now as stirng.
|
|
static string | GetDateTimeToString () |
| Returns now as stirng.
|
|
static string | GetDateToString () |
| Returns only the date as string.
|
|
static bool | IsSameDay (DateTime dt1, DateTime dt2) |
| Return true when the dates are in same day.
|
|
static string | GetDateToString (DateTime dateTime) |
| Returns the date as string.
|
|
static string | GetDateTimeToString (DateTime dateTime) |
| Returns the date time as string.
|
|
static DateTime | ToDate (string str) |
| Converts a string to date time.
|
|
static DateTime | SetHour (DateTime dateTime, int hour) |
| Sets the hour of datetime.
|
|
static DateTime | SetMinute (DateTime dateTime, int minute) |
| Set the minute of datetime.
|
|
static bool | IsWeekDay (DateTime dateTime) |
| Returns true when the day is a weekday.
|
|
static void | Swap (ref DateTime dt1, ref DateTime dt2) |
| Swaps date times.
|
|
static DateTime | GetDate (DateTime dt) |
| Returns the date value of DateTime without time.
|
|
|
static DateTime | emptyDate = DateTime.MaxValue |
| Value of empty date.
|
|
static IFormatProvider | formatProvider = System.Globalization.DateTimeFormatInfo.InvariantInfo |
| String format of date time.
|
|
|
static DateTime | date1 = DateTime.Now |
| Initialized date time. For example date time on server.
|
|
static DateTime | date2 = DateTime.Now |
| Initialized date time on local computer.
|
|
Represents a date time handler class. Date 1 and date 2 use for synconize date time with another system.
◆ GetDate()
static DateTime Tools.DateTool.GetDate |
( |
DateTime | dt | ) |
|
|
static |
Returns the date value of DateTime without time.
- Parameters
-
- Returns
- DateTime without time.
◆ GetDateTimeToString() [1/2]
static string Tools.DateTool.GetDateTimeToString |
( |
| ) |
|
|
static |
Returns now as stirng.
- Returns
- Now as string.
◆ GetDateTimeToString() [2/2]
static string Tools.DateTool.GetDateTimeToString |
( |
DateTime | dateTime | ) |
|
|
static |
Returns the date time as string.
- Parameters
-
- Returns
- Date time as string.
◆ GetDateToString() [1/2]
static string Tools.DateTool.GetDateToString |
( |
| ) |
|
|
static |
Returns only the date as string.
- Returns
- Date as string.
◆ GetDateToString() [2/2]
static string Tools.DateTool.GetDateToString |
( |
DateTime | dateTime | ) |
|
|
static |
Returns the date as string.
- Parameters
-
- Returns
- Date as stirng.
◆ GetFullTimeToString()
static string Tools.DateTool.GetFullTimeToString |
( |
| ) |
|
|
static |
Returns now as stirng.
- Returns
- Now as string.
◆ Initialize()
static void Tools.DateTool.Initialize |
( |
DateTime | date | ) |
|
|
static |
Initializes the date time syncronization.
- Parameters
-
◆ IsSameDay()
static bool Tools.DateTool.IsSameDay |
( |
DateTime | dt1, |
|
|
DateTime | dt2 ) |
|
static |
Return true when the dates are in same day.
- Parameters
-
dt1 | 1 st date time. |
dt2 | 2 nd date time. |
- Returns
- True when the day is same.
◆ IsWeekDay()
static bool Tools.DateTool.IsWeekDay |
( |
DateTime | dateTime | ) |
|
|
static |
Returns true when the day is a weekday.
- Parameters
-
- Returns
- True whe weekday.
◆ Now()
static DateTime Tools.DateTool.Now |
( |
| ) |
|
|
static |
Now of date time.
- Returns
- The current datetime.
◆ SetHour()
static DateTime Tools.DateTool.SetHour |
( |
DateTime | dateTime, |
|
|
int | hour ) |
|
static |
Sets the hour of datetime.
- Parameters
-
dateTime | Date time to set. |
hour | Number of hour. |
- Returns
- Set datetime.
◆ SetMinute()
static DateTime Tools.DateTool.SetMinute |
( |
DateTime | dateTime, |
|
|
int | minute ) |
|
static |
Set the minute of datetime.
- Parameters
-
dateTime | Date time to set. |
minute | number of minutes. |
- Returns
- Set datetime.
◆ Swap()
static void Tools.DateTool.Swap |
( |
ref DateTime | dt1, |
|
|
ref DateTime | dt2 ) |
|
static |
Swaps date times.
- Parameters
-
dt1 | Date time 1. |
dt2 | Date time 2. |
◆ ToDate()
static DateTime Tools.DateTool.ToDate |
( |
string | str | ) |
|
|
static |
Converts a string to date time.
- Parameters
-
- Returns
- The date time.
◆ Today()
static DateTime Tools.DateTool.Today |
( |
| ) |
|
|
static |
Returns the current date without time.
- Returns
- DateTime without time.
The documentation for this class was generated from the following file:
- Z:/x4t/src/Tools/DateTool.cs