Timestamp related methods.
A set of methods to help with breaking down and comparing timestamps.
_years()
Get the total epoch years for a single timestamp or calculate the time difference in years between two timestamps.
- Name
this
- Type
- object
- Description
An object of type int. (Epoch timestamp in milliseconds only).
- Name
timestamp2
- Type
- int
- Description
An object of type int. (Epoch timestamp in milliseconds only). Optional. The default is na.
- Name
returns
- Type
- int/float
- Description
The total time difference in years.
_months()
Get the total epoch months for a single timestamp or calculate the time difference in months between two timestamps.
- Name
this
- Type
- object
- Description
An object of type int. (Epoch timestamp in milliseconds only).
- Name
timestamp2
- Type
- int
- Description
An object of type int. (Epoch timestamp in milliseconds only). Optional. The default is na.
- Name
returns
- Type
- int/float
- Description
The total time difference in months.
_weeks()
Get the total epoch weeks for a single timestamp or calculate the time difference in weeks between two timestamps.
- Name
this
- Type
- object
- Description
An object of type int. (Epoch timestamp in milliseconds only).
- Name
timestamp2
- Type
- int
- Description
An object of type int. (Epoch timestamp in milliseconds only). Optional. The default is na.
- Name
returns
- Type
- int/float
- Description
The total time difference in weeks.
_days()
Get the total epoch days for a single timestamp or calculate the time difference in days between two timestamps.
- Name
this
- Type
- object
- Description
An object of type int. (Epoch timestamp in milliseconds only).
- Name
timestamp2
- Type
- int
- Description
An object of type int. (Epoch timestamp in milliseconds only). Optional. The default is na.
- Name
returns
- Type
- int/float
- Description
The total time difference in days.
_hours()
Get the total epoch hours for a single timestamp or calculate the time difference in hours between two timestamps.
- Name
this
- Type
- object
- Description
An object of type int. (Epoch timestamp in milliseconds only).
- Name
timestamp2
- Type
- int
- Description
An object of type int. (Epoch timestamp in milliseconds only). Optional. The default is na.
- Name
returns
- Type
- int/float
- Description
The total time difference in hours.
_minutes()
Get the total epoch minutes for a single timestamp or calculate the time difference in minutes between two timestamps.
- Name
this
- Type
- object
- Description
An object of type int. (Epoch timestamp in milliseconds only).
- Name
timestamp2
- Type
- int
- Description
An object of type int. (Epoch timestamp in milliseconds only). Optional. The default is na.
- Name
returns
- Type
- int/float
- Description
The total time difference in minutes.
_seconds()
Get the total epoch seconds for a single timestamp or calculate the time difference in seconds between two timestamps.
- Name
this
- Type
- object
- Description
An object of type int. (Epoch timestamp in milliseconds only).
- Name
timestamp2
- Type
- int
- Description
An object of type int. (Epoch timestamp in milliseconds only). Optional. The default is na.
- Name
returns
- Type
- int/float
- Description
The total time difference in seconds.
_getTimeDifference()
Get a detailed breakdown of the time difference from the current time or between two UNIX timestamps.
- Name
this
- Type
- object
- Description
An object of type int. (Epoch timestamp in milliseconds only).
- Name
timestamp2
- Type
- int
- Description
An object of type int. (Epoch timestamp in milliseconds only). Optional. The default is na.
- Name
years
- Type
- bool
- Description
Calculate the total number of years. Use false to omit. Optional. The default is true.
- Name
months
- Type
- bool
- Description
Calculate the total number of months. Use false to omit. Optional. The default is true.
- Name
weeks
- Type
- bool
- Description
Calculate the total number of weeks. Use false to omit. Optional. The default is true.
- Name
days
- Type
- bool
- Description
Calculate the total number of days. Use false to omit. Optional. The default is true.
- Name
hours
- Type
- bool
- Description
Calculate the total number of hours. Use false to omit. Optional. The default is true.
- Name
minutes
- Type
- bool
- Description
Calculate the total number of minutes. Use false to omit. Optional. The default is true.
- Name
seconds
- Type
- bool
- Description
Calculate the total number of seconds. Use false to omit. Optional. The default is true.
- Name
returns
- Type
- int/float
- Description
Complete breakdown of the time difference into various segments.