Circadian answers one question: is it day or night right now at a given place? It decides from the real sunrise and sunset there, from fixed clock times, or from a manual setting, and makes the answer available to themes and modules as a service and as tokens. Use it to switch a theme between day and night styles, show different content after dark, or vary behaviour by time of day.
Features
- Three modes: automatic (real sunrise and sunset at your location), scheduled (fixed times, which may run across midnight, e.g. 20:00 to 04:00), or manual.
- Service and tokens with proper cache metadata, so themes and modules can ask "is it night?" safely.
- Sunrise, sunset and weather block. Weather comes from Open-Meteo (worldwide) or the US National Weather Service, through WeatherProvider plugins. Other providers can be added.
- Sky block with the astronomical dark window, the Moon's phase (calculated locally) and, optionally, the next visible pass of the International Space Station.
- Shows the position rounded to one decimal, never the exact coordinates.
- Status report entries, uninstall clean-up and its own "Administer Circadian" permission.
Similar projects
Weather modules show forecasts. Dark mode modules follow a user toggle or the visitor's OS setting. Circadian is different: it works out day and night from the sun at a location and exposes that as an API.
Requirements
- Drupal 10.3 or 11.
- Outbound HTTPS to sunrise-sunset.org and your weather provider.
- Optional: for ISS passes, the Predict library (shupp/predict). It is not on Packagist, so it is listed under composer "suggest" and the README shows the repository entry to add. Without it, the ISS line is simply left out.
Installation
Install as you would any contributed module: composer require drupal/circadian, then enable it.
Configuration
- Grant the "Administer Circadian" permission as needed.
- Go to Configuration » System » Circadian. Set a latitude and longitude (there is no default) and choose a mode and a weather provider.
- Place the blocks you want, and use the service or tokens in your theme.
Data sources
Sunrise and sunset: sunrise-sunset.org. Weather: Open-Meteo (CC BY 4.0) or the US National Weather Service. ISS orbital data: CelesTrak, fetched at most twice a day. Please keep the attribution shown with the data.
Ask your assistant about Circadian
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0-alpha1 | Pre-release | 10–11 | Nov 21, 2026 |