日光
APIにアクセスせずに、地理的位置の日の出と日の入りの時刻を取得します。
- スター
- 64
- フォーク
- 13
- 最終プッシュ(UTC)
- 2026/02/17
- プロジェクト状態
- 公開中
元の README
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
Daylight
Get the sunset and sunrise times for a geolocation without having to access any remote api.
This is a simple implementation of the legendary Sunset/Sunrise algorithm.
Installation 💻
❗ In order to start using Daylight you must have the Dart SDK installed on your machine.
Install it:
dart pub add daylight
Usage 📖
Check the API docs, example and tests for more information about how to use it.
import 'package:daylight/daylight.dart';
final berlin = DaylightLocation(52.518611, 13.408056);
final berlinCalculator = DaylightCalculator(berlin);
final dailyResults = berlinCalculator.calculateForDay(DateTime.now(), Zenith.astronomical);
print(dailyResults.sunrise); // Some UTC datetime with sunrise hours like 08:32
print(dailyResults.sunset);
print(dailyResults.type); // day type, will probably be sunriseAndSunset unless you live near the north pole or south pole
double eventHourEpoch = berlinCalculator.calculateEvent(DateTime.now(), Zenith.official, EventType.sunset);
print(DateTime.fromMillisecondsSinceEpoch(eventHourEpoch.floor()));
言語Dart
使用している依存関係
依存関係一覧 5 件
- equatable
^2.0.5 - intl開発用
>=0.19.0 <0.21.0 - mocktail開発用
^1.0.0 - test開発用
^1.19.2 - very_good_analysis開発用
>=5.1.0 <8.0.0
プロジェクトに合うリポジトリを選ぶには?
用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
- 名前・作者・説明で検索し、技術トピックで絞り込みます。
- スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
- 利用前に GitHub で README、ライセンス、Issues を確認します。
情報源と管理
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗