For your website
Julian Date Widget
Display today's Julian date on your website or intranet. The widget calculates locally using the visitor's device clock.
Embeddable widget
Add this script where you want the date to appear. After loading, the widget updates without making additional network requests.
<script src="https://todayjuliandate.com/widget.js"></script> With options:
<script src="https://todayjuliandate.com/widget.js"
data-format="full"
data-theme="auto"></script> | Attribute | Default | Values |
|---|---|---|
| data-format | yyyyddd | yyyyddd · yyddd · ddd · jd · mjd · full |
| data-theme | auto | auto · light · dark |
| data-tz | local | local · utc |
| data-link | true | Set to false to drop the credit link |
| data-target | — | CSS selector to render into, instead of in place |
What each format shows
data-format | Shows | Today (UTC) |
|---|---|---|
| yyyyddd | 7-digit Julian date | 2026339 |
| yyddd | 5-digit Julian date | 26339 |
| ddd | Day of year, 3 digits | 339 |
| jd | Astronomical Julian Date, ticking every second | 2461379.5 at 00:00 |
| mjd | Modified Julian Date, ticking every second | 61379.0 at 00:00 |
| full | 7-digit Julian date with the full date and day count | 2026339 |
With the default data-tz="local", each visitor sees the
date for their own device’s time zone, so the value changes at
their midnight. Use data-tz="utc" when everyone must see
the same code, for example on a shared production-floor display.
Where to paste it
- Plain HTML pages and intranets: paste the script tag where the date should appear.
- WordPress: add a Custom HTML block and paste the script tag. Some hosted plans strip scripts; use the iframe instead.
- Site builders and dashboards that remove script tags or only allow embeds: use the iframe version below.
As an iframe
If a script tag is not allowed where you need it, embed the standalone page instead:
<iframe src="https://todayjuliandate.com/embed/"
width="320" height="150" frameborder="0"
title="Today's Julian date"></iframe> Privacy and performance
The script is one small file. It computes the date from the visitor’s own clock, sets no cookies and makes no further network requests after it loads. The iframe version loads a small page from this site instead. To build your own version, the formulas are on the JavaScript code page.
Licence
The widget is free for any use, including commercial. No attribution is required, though a link back to todayjuliandate.com is appreciated.