1use jiff::{civil, tz::TimeZone};
2use rust_zmanim::prelude::*;
3
4fn main() {
5 let date = civil::date(2025, 7, 29);
6
7 let beit_meir = GeoLocation::new(
9 31.7975,
10 35.0345,
11 526.0,
12 TimeZone::get("Asia/Jerusalem").unwrap(),
13 )
14 .unwrap();
15
16 if let Some(sunrise) = zmanim_calculator::hanetz(date, &beit_meir, false) {
18 println!("Sunrise: {}", sunrise.strftime("%Y-%m-%d %H:%M:%S %Z"));
19 }
20
21 if let Some(tzeis_degrees) =
24 zmanim_calculator::tzeis(date, &beit_meir, false, &ZmanOffset::Degrees(6.13))
25 {
26 println!(
27 "Tzeis (6.13 deg): {}",
28 tzeis_degrees.strftime("%Y-%m-%d %H:%M:%S %Z")
29 );
30 }
31
32 let czc = ComplexZmanimCalendar::new(beit_meir, date, UseElevation::No);
36
37 if let Some(alos120) = czc.alos_120_minutes() {
38 println!(
39 "Alos (120 min): {}",
40 alos120.strftime("%Y-%m-%d %H:%M:%S %Z")
41 );
42 }
43
44 if let Some(sz18) = czc.shaah_zmanis_mga_18_degrees() {
45 println!("Shaah zmanis (MGA 18 deg): {sz18:#}");
46 }
47
48 let north_pole = GeoLocation::new(90.0, 0.0, 0.0, TimeZone::UTC).unwrap();
51 let polar_sunset = zmanim_calculator::shkia(date, &north_pole, false);
52 println!("Sunset at the North Pole in July: {polar_sunset:?}");
53}