praytimes

Crates.iopraytimes
lib.rspraytimes
version1.1.0
sourcesrc
created_at2023-09-05 06:06:02.995086
updated_at2023-11-24 16:13:46.593828
descriptionMuslim prayer times calculation
homepage
repositoryhttps://github.com/basemax/praytimesrust
max_upload_size
id963964
size9,448,134
Max Base (BaseMax)

documentation

README

praytimes

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.

Installation

cargo add praytimes

Example

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),
);

Docs

see lib.rs docs

Credits

PrayTimes.js is based on PrayTimes. Cities dataset from countries-states-cities-database.

Based on javascript refactor from time-pray

License

GNU GPL v3.0 - see LICENSE

Commit count: 69

cargo fmt