julian_date
Convert a day-number date code (a "Julian date" on packaging: DDD, YDDD, YYDDD, CYYDDD or YYYYDDD) or an astronomical Julian Date (JD, MJD) to a calendar date, or a calendar date to every code form. Give code or date, not both. Dates from 1583-01-01 to 9999-12-31. A code that is not a date gets an error and a hint, not a guess. An answer for a code with a year in it says how old the date is, counted from today; for a three-digit code, the day this year once it has come.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "julian_date"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | One code as printed: 3 digits (day of year, as on egg cartons), 4 (last digit of year + day), 5 (two-digit year + day), 6 (JD Edwards CYYDDD) or 7 (four-digit year + day). A separator between year and day is allowed (25-319, 2025-319, 2025.319). Letters around one group of digits are left out ("LOT 25319 B2" reads 25319); two groups of digits ("042 155") are refused as two codes. For an astronomy number send the decimals (2460994.5) or put JD or MJD in front (MJD 61360). One code per call. | |
| date | No | A Gregorian calendar date as YYYY-MM-DD, from 1583-01-01 to 9999-12-31, to get its day number and codes. | |
| today | No | Optional, YYYY-MM-DD, from 1583-01-01 to 9999-12-31 (default: today in UTC). The date a one-digit or two-digit year is read against, and the date the age of the result is counted from. A two-digit year is read as a year from today minus 89 years to today plus 10, moved to stay inside 1583 to 9999; a one-digit year as the latest year ending in that digit, not after this year. Set it to the date the item was handled when the code is old. |