fj(date)
Convert a specific Gregorian date to its equivalent Julian day number. The Gregorian date order format is specified by the date order built-in setting.
Syntax
integer fj(date)
Parameters
date
A Gregorian date. Format is specified by the built-in setting date order.
Return Value
Returns the equivalent Julian day number.
Notes
The difference between the d() and fj() functions is that d() requires a date to be supplied as three separate parameters, in a very specific format: yyyy,mm,dd, (such as
d( 2015, 12, 25)
). fj(), by contrast, accepts a single date parameter whose format is flexible.fj() uses the built-in setting date order, which uses 3 letters, m, d, and y, to determine the order in which the function expects the month, day and year to be present.
fj() does not use the built-in setting date format. Instead, fj() is inherently flexible in the date formats it accepts.
Recognizable formats:
Year format
yyyy
- Four-digit year (e.g.
2005
).
yy
- Two-digit year (e.g.
05
).
Month format
mmmm
- Long month name. All letters are lowercase (e.g.
september
).
Mmmm
- Long month name. Only the first letter is uppercase (e.g.
September
).
MMMM
- Long month name. All letters are uppercase (e.g.
SEPTEMBER
).
mmm
- Short month name. All letters are lowercase (e.g.
sep
).
Mmm
- Short month name. Only the first letter is uppercase (e.g.
Sep
).
MMM
- Short month name. All letters are uppercase (e.g.
SEP
).
mm
- Month number. Prepend a leading zero to month if the month is less than 10 (e.g.
09
).
m
- Month number. Do not prepend a leading zero to month (e.g.
9
).
Day format
dddd
- Long day name. All letters are lowercase (e.g.
wednesday
).
Dddd
- Long day name. Only the first letter is uppercase (e.g.
Wednesday
).
DDDD
- Long day name. All letters are uppercase (e.g.
WEDNESDAY
).
ddd
- Short day name. All letters are lowercase (e.g.
wed
).
Ddd
- Short day name. Only the first letter is uppercase (e.g.
Wed
).
DDD
- Short day name. All letters are uppercase (
WED
).
dd
- Two-digit day (e.g.
04
).
d
- One-digit day for days below 10 (e.g.
4
).
Delimiter format
hyphen, slash, or nearly any single-character punctuation is accepted.
- Four-digit year (e.g.
Applicable Built-In Settings
The following built-in setting(s) are supported: date order.