mads.time
plugin with time related functions.
-
day
()[source]
” return the current day.
-
elapsed
(seconds, short=True)[source]
return a string showing the elapsed days, hours, minutes, seconds.
use standard time timeformats to extract a time from a string.
-
file_time
(timestamp)[source]
return a pseudo random time on today’s start of the day.
-
fn_time
(daystr)[source]
determine the time used in a MADS filename.
-
get_day
(daystr)[source]
get the day from the string provided.
-
get_hour
(daystr)[source]
get the hour from the string provided.
-
get_time
(txt)[source]
get time from a string containing day and/or hour.
-
hms
()[source]
return hour:minutes:seconds of toda=y.
-
now
()[source]
turn a datetime string of the current time.
-
parse_time
(txt)[source]
” parse a string for a time mentioned. also parse for a diff in seconds.
-
rtime
()[source]
return a filestamp usable in a filename.
-
to_date
(*args, **kwargs)[source]
convert to date.
-
to_day
(daystr)[source]
try to detect a time in a string.
-
to_time
(daystr)[source]
convert time/date string to a unix timestamp
example: 2016-08-29 16:34:23.837288
example: Sat Jan 14 00:02:29 2017
-
today
()[source]
” return the day of a MADS filename.
-
year
()[source]
return the year we are living in.