JUL() - Get Julian Date - BBj
For this topic's original documentation, see the JUL() Function - Get Julian Date.
BBj-Specific information
Syntax
JUL(year,month,day{MODE="SERVER|CLIENT"}{,ERR=lineref})
JUL(str1{,str2}{,str3}{,ERR=lineref})
Description
In BBj 4.0 and higher, the JUL() function returns the Julian day number for a given date.
Parameter |
Description |
str1 |
Date string. |
str2 |
Date mask. If not specified, the mask from STBL("!DATE") is used. The mask is used to determine if the basic date format is MM/DD/YY (US), DD/MM/YY (EU) or YY/MM/DD (ISO), by looking at the relative positions of "%M", "%D" and "%Y" in the mask. If the date format cannot be determined from the mask, it is assumed to be MM/DD/YY. |
str3 |
Locale. If not specified, the value of STBL("!LOCALE") is used. The locale is only relevant when passing a date string containing a week number reference. For more information, see Date Input - BBj. |
year month day |
As described in JUL() Function - Get Julian Date, JUL(0,0,0) returns the Julian value for the current date. By default, this is based on the current date from the server. In BBj 12.0 and higher, this can be changed to use the date from the client by setting SETOPTS byte 8, bit $08$. |
MODE=mode |
In BBj 12.0 and higher, use JUL(0,0,0,MODE="SERVER") or JUL(0,0,0,MODE="CLIENT") to explicitly return either server or client Julian date, independent of SETOPTS byte 8, bit $08$. |
ERR=lineref |
Branch to be taken if an error occurs during execution. |