time2mjd
Converts unix time to a modified Julian date.
Keyboard Maestro: TIME2MJD
Details #
time2mjd(x) takes exactly one argument, unix time, and returns a modified Julian date as a number with decimals.
Unix time is in seconds and independent of time zone. For example time2mjd(946728000) is 51544.5.
Parameters #
Takes 1 argument.
{{ time2mjd(text) }}
Examples #
time2mjd(946728000)→
51544.5time2mjd(value)→
51544.5| Sample variable | Value |
|---|---|
value | 946728000 |
Gotchas #
Calling it with no argument or two arguments is an error:
time2mjd() takes 1 argument, got 2.Anything that isn't a number is an error:
time2mjd() 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
time2mjd() has no result for that number.