Julia SDK
Install
using Pkg
Pkg.add("TimeNow")
Quick Start
using TimeNow
client = TimeNowClient("http://localhost:8090")
# Solar time for London
result = get_solar_time(client; lat=51.5074, lng=-0.1278)
println(result.solar_time) # "2026-04-14T11:49:23"
println(result.civil_solar_offset_min) # -10.6
# Social jetlag
jetlag = get_jetlag(client; lat=39.47, lng=75.99)
println(jetlag.risk_level) # "severe"
# Deviation map as DataFrame
using DataFrames
df = get_deviation_map(client; format="csv")
describe(df)
Methods
| Method | Parameters | Returns | API endpoint |
get_solar_time(client; lat, lng, utc=nothing) | keyword args | SolarTimeResult | GET /solar |
get_jetlag(client; lat, lng) | keyword args | JetlagResult | GET /solar/jetlag |
get_prayer_times(client; lat, lng, date=nothing, convention="mwl") | keyword args | PrayerTimesResult | GET /solar/prayer |
get_almanac(client; lat, lng, year=nothing) | keyword args | AlmanacResult | GET /solar/almanac |
get_deviation_map(client; format="json") | keyword arg | Dict or DataFrame | GET /world/deviation-map |
health(client) | — | Bool | GET /health |
Research Example
using TimeNow, DataFrames, Plots
client = TimeNowClient("http://localhost:8090")
df = get_deviation_map(client; format="csv")
histogram(df.civil_solar_offset_min,
bins=50,
xlabel="Civil-Solar Offset (min)",
ylabel="Count",
title="Global Civil-Solar Misalignment Distribution")