Next: , Previous: , Up: Replacements with other argument   [Contents][Index]


G.2.2.3 Julian day number %[format]j[argument] special text

%[format]j[[+|-]n] references the current respectively queried Julian day number relative to the actual system date (≡today). This day number is based on the date 1st January 4713 BCE —which is the starting day zero of a consecutive day counting used in astronomical computations— and is known as the Julian Date (J.D.). The real zero of this date is at 12 o’clock Universal time (UTC/GMT); the day does not change at midnight, but at noon Universal time. Here, Gcal does not evaluate the timezone returned by the systems date function. For that reason, this day number is represented without a time fraction on the supposition that the day has already changed at noon. If you do not like the feature that the day displayed has already changed at noon, you can decrease the resulting Julian day number of that special text always by one, e.g. ‘%j-1’.

For example:

The resource file line ‘0 Julian day %j since 01-Jan-4713 BCE will be expanded to
→ ‘Julian day 2437929 since 01-Jan-4713 BCE, in case you call Gcal with the -c %19620921 option and no command.

If the %[format]j text is directly trailed by an unsigned number, this number is always subtracted from the real Julian day number. So you are able to work with any quantities referenced, e.g.:

The resource file line ‘0 Julian day %j2415021 since 01-Jan-1900 will be expanded to
→ ‘Julian day 4 since 01-Jan-1900, in case you call Gcal with the -c %19000105 option and no command.


Next: , Previous: , Up: Replacements with other argument   [Contents][Index]