import Foundation class PlanetCalculator
func getMoonPhase(date: Date) -> String // Simplified lunar cycle let lunarMonth: Double = 29.53058867 let referenceNewMoon = Date(timeIntervalSince1970: 946684800) // Jan 1 2000 let daysSince = date.timeIntervalSince(referenceNewMoon) / 86400 let phase = daysSince.truncatingRemainder(dividingBy: lunarMonth) / lunarMonth switch phase case 0..<0.125: return "π New" case 0.125..<0.25: return "π Waxing" case 0.25..<0.375: return "π First Q" case 0.375..<0.5: return "π Gibbous" case 0.5..<0.625: return "π Full" case 0.625..<0.75: return "π Waning" case 0.75..<0.875: return "π Last Q" default: return "π Balsamic" io astrology software for mac
import CoreSpotlight import MobileCoreServices class SpotlightIndexer static func indexChart(_ birthData: BirthData, positions: [PlanetaryPosition]) let attributeSet = CSSearchableItemAttributeSet(contentType: .text) attributeSet.title = "(birthData.name)'s Natal Chart" attributeSet.contentDescription = positions.map "($0.planet.symbol) in ($0.zodiacSign)" .joined(separator: ", ") 0.125: return "π New" case 0.125..<
var degreeInSign: Double longitude.truncatingRemainder(dividingBy: 30) 0.25: return "π Waxing" case 0.25..<
var body: some Scene WindowGroup ContentView() .windowStyle(.titleBar) .commands CommandMenu("Chart") Button("Recalculate Now") NotificationCenter.default.post(name: .init("recalculate"), object: nil) .keyboardShortcut("R")
func applicationDidFinishLaunching(_ notification: Notification) statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) if let button = statusItem?.button button.title = "β Io" button.action = #selector(togglePopover) // Update planetary hour every minute Timer.scheduledTimer(withTimeInterval: 60, repeats: true) _ in self.updateMenubarText() updateMenubarText()