python.shotgun_globals.date_time module¶
-
create_human_readable_date
(dt)[source]¶ Return the date represented by the argument as a string, displaying recent dates as “Yesterday”, “Today”, or “Tomorrow”.
Parameters: dt ( datetime.date
ordatetime.datetime
) – The date convert to a stringReturns: A String representing date appropriate for display
-
create_human_readable_timestamp
(dt, postfix='')[source]¶ Return the time represented by the argument as a string where the date portion is displayed as “Yesterday”, “Today”, or “Tomorrow” if appropriate.
By default just the date is displayed, but additional formatting can be appended by using the postfix argument.
Parameters: - dt (
datetime.datetime
or float) – The date and time to convert to a string - postfix (A strftime style String) – What will be displayed after the date portion of the dt argument
Returns: A String representing dt appropriate for display
- dt (