#prayer #times #muslim #shia

praytimes

穆斯林祈祷时间计算

2个稳定版本

1.1.0 2023年11月24日
1.0.0 2023年9月5日

#626数学

33 每月下载量
用于 praytimes-kit

GPL-3.0 许可证

9.5MB
610

praytimes

基于Praytimes.org的Rust祈祷时间计算器

不要忘记根据他们的许可证给Praytimes.org

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.

本程序分发时希望它是有用的,但没有任何保证。

安装

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

文档

lib.rs 文档

致谢

PrayTimes.js基于PrayTimes。城市数据来自countries-states-cities-database

基于time-pray的javascript重构

许可证

GNU GPL v3.0 - 查看 LICENSE

依赖