mirror of
https://github.com/acamarata/pray-calc.git
synced 2026-07-01 11:24:26 +00:00
Add typedoc and typedoc-plugin-markdown as devDependencies. Add typedoc.json config targeting src/index.ts with markdown output to .github/wiki/api. Add docs script to package.json. Generate initial API reference pages. Part of T-E8-03 — TypeDoc automation for all 12 JS/TS packages.
34 lines
606 B
Markdown
34 lines
606 B
Markdown
[**pray-calc v2.1.1**](../README.md)
|
|
|
|
***
|
|
|
|
[pray-calc](../README.md) / toJulianDate
|
|
|
|
# Function: toJulianDate()
|
|
|
|
> **toJulianDate**(`date`): `number`
|
|
|
|
Defined in: [getSolarEphemeris.ts:22](https://github.com/acamarata/pray-calc/blob/af34aef986c37d8de9cf8db0744a41e3b0c99c40/src/getSolarEphemeris.ts#L22)
|
|
|
|
Convert a JavaScript Date to a Julian Date number.
|
|
|
|
## Parameters
|
|
|
|
### date
|
|
|
|
`Date`
|
|
|
|
Any JavaScript Date object (uses UTC internally)
|
|
|
|
## Returns
|
|
|
|
`number`
|
|
|
|
Julian Date: days since noon January 1, 4713 BC UTC
|
|
|
|
## Example
|
|
|
|
```ts
|
|
const jd = toJulianDate(new Date('2024-06-21'));
|
|
// jd ≈ 2460482.5
|
|
```
|