Skip to the content.

Usage

← Overview

Install

bdate needs only the standard library and Python 3.10 or later.

From a checkout of the repository (the Python package lives in python/):

uv tool install ./python    # install the `bdate` command globally
uvx --from ./python bdate   # run without installing
pip install ./python        # plain pip also works

A dependency-free JavaScript port with the same output lives in js/, for use in web pages.

Command line

Option Effect
(none) Convert the current moment, local time
-u, --utc Use UTC instead of local time
-d ISO, --date ISO Convert an ISO-8601 datetime instead of now (read as Gregorian)
--lat, --lon Location used for sunrise/sunset (default: Constantinople)
--no-hours Skip the seasonal-hour calculation
--json Print machine-readable JSON
-V, --version Print the version

If you pass a datetime with no UTC offset to -d, bdate uses the local time zone, or UTC if you also give -u.

Reading the output

Tritē, 29 Maios 6961 AM (Julian 1453-05-29), indiction 1, 2nd hour of the day
└─┬─┘  └────┬────┘ └─┬─┘  └────────┬──────┘  └────┬────┘  └────────┬────────┘
weekday  Julian day  era  numeric Julian date  indiction    seasonal hour
         + month     year

At night the hour part reads, for example, 5th hour of the night (2nd watch).

JSON fields

Field Meaning
gregorian The input instant, ISO-8601
julian_year, julian_month, julian_day The Julian calendar date
month_name, weekday Romanised Byzantine names
anno_mundi Byzantine world-era year
indiction 1–15
seasonal null, or {period, hour, watch, start, end}

Web API

https://bdate.app/api/v1/date returns the same JSON over HTTP, plus text (the one-line output) and the lat and lon it used:

$ curl 'https://bdate.app/api/v1/date?date=1453-05-29T05:30&tz=Europe/Istanbul'
{"gregorian":"1453-05-29T05:30:00+01:55", …, "text":"Kyriakē, 20 Maios 6961 AM (Julian 1453-05-20), indiction 1, 1st hour of the day", …}
Parameter Effect
(none) Convert the current moment, in UTC, for Constantinople
date An ISO-8601 datetime instead of now (read as Gregorian)
tz An IANA time zone, e.g. Europe/Athens: report the date and hours at its offset
lat, lon Location used for sunrise/sunset
hours=0 Skip the seasonal-hour calculation

A date with a UTC offset keeps that offset unless you also give tz. One without an offset is read in tz, or in UTC. Bad input gets a 400 response with an error message. Before 1970 or so, time zones fall back to local mean time (Istanbul’s is +01:55), so for old dates you may prefer an explicit offset such as +02:00.

Schedule

https://bdate.app/api/v1/schedule gives the same reckoning over a stretch of time, for widgets and other clients that cannot run the calculation themselves. Fetch it once or twice a day and show the segment that contains the current time:

$ curl 'https://bdate.app/api/v1/schedule?date=2026-10-18T10:00&tz=Europe/Athens&lat=37.98&lon=23.73'
{"from":"2026-10-18T10:00:00+03:00","to":"2026-10-19T10:23:26+03:00","lat":37.98,"lon":23.73,
 "segments":[{"from":"2026-10-18T10:00:00+03:00","to":"2026-10-18T10:23:02+03:00","julian_year":2026, …, "text":"…, 3rd hour of the day"}, …]}

It takes the same parameters as /api/v1/date, plus span: the hours to cover from date, from 1 to 168 (default 24). Each segment has from, to and the fields /api/v1/date returns at any moment in between (without gregorian, lat and lon). A new segment starts at each seasonal-hour boundary, at midnight and when tz changes its offset. The first segment starts at date and the last one ends at or just after date + span.