Commit f9a29c7
authored
Made Location::try_new public (#7775)
In order to get observational islamic date for locations other than
`MECCA` and `CAIRO`
Example:
```rust
let new_york = Location::try_new(40.7, -74.0, 10.0, -5.0 / 24.0).unwrap();
let fixed = fixed_from_gregorian(2026, 3, 13);
let (year, month, day) = observational_islamic_from_fixed(fixed, new_york);
println!("Observational NYC: {day}/{month}/{year}");
```
## Changelog
calendrical_calculations: Changed `Location::try_new` from `pub(crate)`
to `pub`
- New Methods: `Location::try_new()`
- New errors: `LocationOutOfBoundsError`1 parent 016c46b commit f9a29c7
2 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
| 82 | + | |
81 | 83 | | |
82 | | - | |
83 | | - | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments