Subscribe to sunrise and sunset times in your calendar.
CalSun is a web service that generates iCal calendar subscriptions for sunrise and sunset times based on your location. Works with iPhone, Google Calendar, Outlook, and any calendar app that supports iCal subscriptions.
- Open the web interface
- Enter your location (city, address, or coordinates)
- Choose which events to include (sunrise, sunset, or both)
- Click "Add to Calendar" or copy the subscription URL
Your calendar will automatically update with sunrise/sunset times for the next 30 days.
docker-compose up# Using Nix
nix develop --command go run .
# Or with Go installed
go run .Returns an iCal calendar file.
| Parameter | Required | Description |
|---|---|---|
lat |
Yes | Latitude (-90 to 90) |
lng |
Yes | Longitude (-180 to 180) |
name |
No | Location name for event details |
exclude |
No | sunrise or sunset to exclude one |
days |
No | Days ahead (default: 30, max: 90) |
Example:
/calendar.ics?lat=55.6761&lng=12.5683&name=Copenhagen
# Enter dev environment
nix develop
# Run tests
go test ./...
# Build
go build -o calsun .This project uses Conventional Commits and Semantic Versioning.
type(scope): description
Types:
feat: New feature (minor version bump)
fix: Bug fix (patch version bump)
refactor: Code refactoring (patch)
docs: Documentation (patch)
chore: Maintenance (patch)
BREAKING CHANGE: or type!: triggers major version bump
# Preview the next version
./scripts/release.sh --dry-run
# Create a release tag
./scripts/release.sh
# Push the tag
git push origin <tag>MIT