Browse the docs

mjd2time

Converts a modified Julian date to unix time.

Keyboard Maestro: MJD2TIME

Details #

mjd2time(x) takes exactly one argument, a modified Julian date, and returns unix time as a number with decimals.

Unix time is in seconds and independent of time zone. For example mjd2time(51544.5) is 946728000.

Parameters #

Takes 1 argument. {{ mjd2time(text) }}

Examples #

mjd2time(51544.5)
→ 946728000
mjd2time(value)
→ 946728000
Sample variableValue
value51544.5

Gotchas #

  • Calling it with no argument or two arguments is an error: mjd2time() takes 1 argument, got 2.

  • Anything that isn't a number is an error: mjd2time() needs a number, got text. Numeric text such as "0.5" is accepted.

  • If the result isn't a finite number the step stops with mjd2time() has no result for that number.