Skip to content

Astrology Calculator calculates moon's rise/set times, moon Age, moon phases and Zodiac Sign for location and time

Notifications You must be signed in to change notification settings

emvakar/EKAstrologyCalc

Repository files navigation

πŸŒ™ 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

    .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.

import UIKit
import CoreLocation
import EKAstrologyCalc

class ViewController: UIViewController {

    let location = CLLocation(latitude: 55.751244, longitude: 37.618423) // Moscow
    var moonPhaseManager: EKAstrologyCalc!

    override func viewDidLoad() {
        super.viewDidLoad()

        moonPhaseManager = EKAstrologyCalc(location: location)
        let info = moonPhaseManager.getInfo(date: Date())

        print("🌍 Current location: \(info.location.coordinate)")
        print("πŸ“… Calculation date: \(info.date)")

        info.moonModels.forEach {
            print("πŸŒ™ --- Lunar Day ---")
            print("πŸ”’ Lunar Day Number: ", $0.age)
            print("πŸŒ… Moonrise: ", $0.rise?.toString(style: .short) ?? "No data")
            print("πŸŒ„ Moonset: ", $0.set?.toString(style: .short) ?? "No data")
            print("β™ˆ Lunar Zodiac Sign: ", $0.sign)
        }

        print("πŸŒ‘ Moon Phase: \(info.phase)")
        print("πŸ“ˆ Moon Trajectory: \(info.trajectory)")
    }
}

This will output on debug console:

🌍 Current location: CLLocationCoordinate2D(latitude: 55.751244, longitude: 37.618423)
πŸ“… Calculation date: 2025-02-09 04:53:16 +0000
πŸŒ™ --- Lunar Day ---
πŸ”’ Lunar Day Number:  11
πŸŒ… Moonrise:  09.02.2025, 12:46
πŸŒ„ Moonset:  10.02.2025, 07:53
β™ˆ 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!

Sponsor this project

Contributors 2

  •  
  •