Harpseal Utils (Helpers)

Command Tools

harpseal.utils.commands.execute(command)[source]

Execute a command.

DateTime Tools

harpseal.utils.datetime.ago(**kwargs)[source]

Return the datetime that points specific times ago.

harpseal.utils.datetime.parse(text, fmt='%Y-%m-%d')[source]

Return the datetime of either text or integer given. This function automatically recognizes the format of text or integer.

harpseal.utils.datetime.unixtime(dt, multiply=True)[source]

Return the unix timestamp of the datetime given.

Parameters:multiply (bool) – whether return as 13-digit timestamp or 10-digit timestamp