JULIAN (Express Tool)

Contains the DATE tool and several AutoCAD Julian date and calendar date conversion routines.

JULIAN is not meant to be entered in the Command window. Enter DATE to display the current date and time in this format: Day YYYY/M/D HH:MM:SS.msec. DATE uses (JTOD) to convert to calendar format, and edits the date and time from there.

Use the syntax indicated for the following functions:

AutoLISP Functions

CTOJ Converts calendar date and time to Julian date Function syntax: (ctoj <year> <month> <day> <hour> <minute> <second/fraction>) Input: Calendar date as argument list Example: (ctoj 1957 10 4 19 26 24) ; Launch of Sputnik 1 Returns: Julian date / fraction, as in the DATE system variable
DTOJ Converts AutoCAD calendar date/time to Julian date Function syntax: (dtoj <calendar date>) Input: Real number YYYYMMDD<.HHMMSSmsec>, like CDATE setvar. Returns: Julian date / fraction, as in DATE system variable
JTOC Converts Julian date to calendar date list Function syntax: (jtoc <Julian date>) Input: Real number <Julian day>.<fraction>, like DATE setvar Returns: Calendar date/time list: (<year> <month> <day> <hour> <minute> <second/fraction>)
JTOD Converts Julian date to AutoCAD calendar date/time Function syntax: (jtod <Julian date>) Input: Real number <Julian day>.<fraction>, like DATE setvar Returns: Calendar date/time, as in CDATEsystem variable
JTOW Determines day of the week for a given Julian day Function syntax: (jtow <Julian date>) Input: Real number <Julian day>.<fraction>, like DATE system variable Returns: Integer day of the week, 0 = Sunday, 1 = Monday, 6 = Saturday

Note: To access the read-only DATE system variable instead, use (getvar "DATE").

File

julian.lsp