| |
- applyFixedTimeComponent(datetimeObj, fixedTimeStr)
- applyFixedTimeComponent - Update a datetime object, replacing the time portion with the given time string.
PUBLIC FUNCTION
Time string is at minimum hours and minutes, with optional seconds and optional AM/PM.
@param datetimeObj <datetime.datetime> - Datetime
@param fixedTimeStr <str> - Time String as hours:minutes or hours:minutes:seconds, with optional AM/PM suffix.
@return <datetime.datetime> - datetimeObj with time replaced.
- text2datetime(timeStr, now=None, monthBeforeDay=True)
- text2datetime - Convert a time string to a datetime.datetime object. This method supports all the types of time strings described in text2datetime.FORMAT_HELP_MSG
PUBLIC FUNCTION
@param timeStr <str> - String of time.
@param now <None/datetime.datetime> - Default None will use current time. Otherwise, calculate time relative to given datetime.
@param monthBeforeDay <bool> - If True, American time format will be used when applicable (month/day/year). If False, European time (day/month/year) will be used when applicable.
print ( text2datetime.FORMAT_HELP_MSG ) for information on the format of timeStr.
@return <datetime.datetime> - Datetime object representing parsed time.
|