Assemble a timestamp from calendar and clock fields

Description

Assemble separately recorded date and clock fields into the timestamp used by the package's ephemeris routines.

Usage

timestring(year, month, day, hour = 12, minute = 0, second = 0)

Arguments

year

Year. Historical labels such as "3700 BC" are accepted by astroYear.

month

Month

day

Day

hour

Hour

minute

Minute

second

Second

Details

Survey records often store year, month, day and clock time separately. This formatter pads the month, day and clock components to two characters and joins them as year/month/day and hours:minutes:seconds. Omitted time is noon. Formatting alone does not supply a timezone or check that the date exists; use time2jd to validate and convert it.

Value

A character date-time string in the slash-separated format accepted by time2jd.

Validation

Build 2.0.9005 passed all 499 calendar, clock, era, angle and setting checks in A01. The largest discrepancy across 240 absolute Julian dates was 0.000021 seconds. See A01 validation in the technical manual.

Scientific checks

See Also

time2jd, jd2time, BC.AD, long.date

Examples

timestring(2018, 12, 25, 2, 34)