Date time
labridge.tools.common.date_time
¶
labridge.tools.common.date_time.get_current_date_time()
¶
This function is used to get the date of today, current time. If you are not sure about current date or time, use this tool to help you.
The returned date is of the following format: "Year-Month-Day". The returned time is of the following format: "Hour:Minute:Time".
Source code in labridge\tools\common\date_time.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
labridge.tools.common.date_time.get_date_time_from_now(backward, days)
¶
This function is used to infer the exact date that a statement means. such as '3 days ago', '2 months later'.
PARAMETER | DESCRIPTION |
---|---|
backward |
the direction, if the statement means the date earlier than now, it is set to
TYPE:
|
days |
the number of days
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
FuncOutputWithLog
|
the result date. |
Source code in labridge\tools\common\date_time.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|