Crates.io | praytimes |
lib.rs | praytimes |
version | 1.1.0 |
source | src |
created_at | 2023-09-05 06:06:02.995086 |
updated_at | 2023-11-24 16:13:46.593828 |
description | Muslim prayer times calculation |
homepage | |
repository | https://github.com/basemax/praytimesrust |
max_upload_size | |
id | 963964 |
size | 9,448,134 |
Prayer Times Calculator for Rust Based on Praytimes.org
Dont forget to give Praytimes.org based on their license :
TERMS OF USE:
Permission is granted to use this code, with or
without modification, in any website or application
provided that credit is given to the original work
with a link back to PrayTimes.org.
This program is distributed in the hope that it will
be useful, but WITHOUT ANY WARRANTY.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
cargo add praytimes
let calculator = &Calculator::new(
methods::ISLAMIC_SOCIETY_OF_NORTH_AMERICA, // calculation method or parameters
TuneOffsets {
fajr: Some(7.0), // time for precaution
..Default::default()
},
);
let output: PraytimesOutput = calculator
.calculate(
&Location {
longitude: 43.0,
latitude: 30.0,
elevation: 0.0, // elevation of that point in meters
},
&NaiveDate::from_ymd_opt(2022, 11, 11),
);
see lib.rs docs
PrayTimes.js is based on PrayTimes. Cities dataset from countries-states-cities-database.
Based on javascript refactor from time-pray
GNU GPL v3.0 - see LICENSE