2026-10-23 15:08:20 +00:00
2026-10-23 15:07:01 +00:00
2026-10-23 14:11:51 +00:00
2026-10-23 14:12:00 +00:00
2026-10-23 14:11:28 +00:00
2026-10-23 14:11:28 +00:00
2026-10-23 14:11:28 +00:00
2026-10-23 15:08:20 +00:00

Sun

sun wraps go-sunrise to calculate sunrise, sunset, and day length for a location.

Usage

sun -c LAT,LON [-d YYYY-MM-DD] [-z TIMEZONE] [-f FORMAT]

Flags:

  • -c — coordinates as latitude,longitude (required)
  • -d — date in YYYY-MM-DD format (default: today)
  • -z — timezone (default: UTC)
  • -f — output time format, Go reference layout (e.g. 15:04 for HH:MM; default: RFC 3339)

The tool outputs three values: sunrise (time), sunset (time), and day length (duration).

Examples

$ sun -c 51.4769,0.0005
2026-10-23T06:37:08Z 2026-10-23T16:51:16Z 10h14m8s

$ sun -c -77.8419,166.6863 \
  -d 2026-03-20 \
  -z Antarctica/McMurdo \
  -f "15:04"
07:38 20:23 12h45m28s

Installation

go install code.chimeric.al/dwrz/sun/cmd/sun@latest
S
Description
No description provided
Readme
1.6 MiB
Languages
Go 65.1%
Makefile 34.9%