Date¶
-
class
date.
Date
¶ Bases:
object
This class provides helpers for date stuff. For example, converting dates to strings and strings to dates.
-
ISO_8601_FORMAT
= '%Y_%m_%d-%H_%M_%S'¶
-
GIT_STRING_FORMAT
= '%a %b %d %H:%M:%S %Y %z'¶
-
static
ConvertDateToString
(x: datetime.datetime) → str¶ Convert the given date into a ISO 8601 formatted string.
-
static
ConvertStringToDateWithFormat
(customFormat: str, x: datetime.datetime) → datetime.datetime¶ Convert the given custom formatted string to a date object.
-
static
ConvertGitStringToDate
(x: str) → datetime.datetime¶ Convert the given string, which is formatted in the way Git formats dates, into a datetime object.
-
static
ConvertStringToDate
(x: str) → datetime.datetime¶ Convert the given ISO 8601 formatted string into a date.
-
static
Now
() → datetime.datetime¶ Get the current date and time information as an object of the datetime class.
-
static
NowAsString
() → str¶ Convert the current date and time information as an object of the datetime class into a string formatted in the ISO 8601 format.
-