项目作者: emvakar

项目描述 :
Astrology Calculator calculates moon's rise/set times, moon Age, moon phases and Zodiac Sign for location and time
高级语言: Swift
项目地址: git://github.com/emvakar/EKAstrologyCalc.git
创建时间: 2019-03-23T09:52:45Z
项目社区:https://github.com/emvakar/EKAstrologyCalc

开源协议:

下载


🌙 EKAstrologyCalc

📅 Astrology Calculator for Moon Phases, Zodiac Signs & More
🛠 Swift-based astronomical calculations for iOS, macOS & tvOS

Swift Version
Tests
GitHub stars
GitHub forks
GitHub issues


🌟 Features

✅ Calculates moon rise/set times
✅ Determines moon phases & age
✅ Computes Zodiac sign for a given date & location
✅ Supports iOS, macOS & tvOS
✅ High-precision astronomical calculations


✅ Completed Features

  • 🌙 Moon phase calculation
  • 🌒 Moon rise/set time estimation
  • 🏛 Zodiac sign determination
  • 📅 Moon age computation
  • 🖥 Cross-platform support (iOS, macOS, tvOS)

🔜 Planned Features

  • 🌎 Location-based enhancements
  • 📊 Improved accuracy in moon cycle prediction
  • 🌓 Visualization of moon phases
  • 📡 API integration for live astronomical data
  • 📆 Custom date range support

🚀 Installation

  1. .package(url: "https://github.com/emvakar/EKAstrologyCalc.git", from: "1.0.6")
  • Requires Xcode 14+
  • Supports iOS 15+, macOS 14+, tvOS 15+

📖 Usage

To use EKAstrologyCalc, import the module and create an instance of MoonPhaseCalculator. The example below demonstrates how to retrieve moon phase details and zodiac sign based on the current date and location.

  1. import UIKit
  2. import CoreLocation
  3. import EKAstrologyCalc
  4. class ViewController: UIViewController {
  5. let location = CLLocation(latitude: 55.751244, longitude: 37.618423) // Moscow
  6. var moonPhaseManager: EKAstrologyCalc!
  7. override func viewDidLoad() {
  8. super.viewDidLoad()
  9. moonPhaseManager = EKAstrologyCalc(location: location)
  10. let info = moonPhaseManager.getInfo(date: Date())
  11. print("🌍 Current location: \(info.location.coordinate)")
  12. print("📅 Calculation date: \(info.date)")
  13. info.moonModels.forEach {
  14. print("🌙 --- Lunar Day ---")
  15. print("🔢 Lunar Day Number: ", $0.age)
  16. print("🌅 Moonrise: ", $0.rise?.toString(style: .short) ?? "No data")
  17. print("🌄 Moonset: ", $0.set?.toString(style: .short) ?? "No data")
  18. print("♈ Lunar Zodiac Sign: ", $0.sign)
  19. }
  20. print("🌑 Moon Phase: \(info.phase)")
  21. print("📈 Moon Trajectory: \(info.trajectory)")
  22. }
  23. }

This will output on debug console:

  1. 🌍 Current location: CLLocationCoordinate2D(latitude: 55.751244, longitude: 37.618423)
  2. 📅 Calculation date: 2025-02-09 04:53:16 +0000
  3. 🌙 --- Lunar Day ---
  4. 🔢 Lunar Day Number: 11
  5. 🌅 Moonrise: 09.02.2025, 12:46
  6. 🌄 Moonset: 10.02.2025, 07:53
  7. Lunar Zodiac Sign: cancer

🛠 Technologies Used

  • Swift
  • Foundation & CoreLocation
  • Astronomical Algorithms
  • UIKit & SwiftUI (if UI included)

🤝 Contributing

Want to improve EKAstrologyCalc? Feel free to:

  • Submit issues 🚀
  • Open pull requests 🔥
  • Suggest features 🌟

📜 License

This project is licensed under the MIT License – see the LICENSE file for details.


🌐 Connect with Me

LinkedIn
Telegram


🌙 Enjoy using EKAstrologyCalc? Give it a ⭐ to support development!