Files
astronomy/source/kotlin/doc/search-global-solar-eclipse.md
Don Cross 5676049596 Kotlin: added iterator helper functions
Added the following iterator functions that wrap
search/next pairs of functions:

    globalSolarEclipsesAfter
    localSolarEclipsesAfter
    lunarApsidesAfter
    lunarEclipsesAfter
    moonNodesAfter
    moonQuartersAfter
    planetApsidesAfter
    transitsAfter

I updated the following Kotlin demos:

    MoonPhase.kt    ==> moonQuartersAfter
    LunarEclipse.kt ==> lunarEclipsesAfter

However, I have not yet figured out how to use these
functions in the corresponding Java demos.
2022-05-06 21:52:27 -04:00

22 lines
1.1 KiB
Markdown

//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[searchGlobalSolarEclipse](search-global-solar-eclipse.md)
# searchGlobalSolarEclipse
fun [searchGlobalSolarEclipse](search-global-solar-eclipse.md)(startTime: [Time](-time/index.md)): [GlobalSolarEclipseInfo](-global-solar-eclipse-info/index.md)
Searches for a solar eclipse visible anywhere on the Earth's surface.
This function finds the first solar eclipse that occurs after startTime. A solar eclipse may be partial, annular, or total. See [GlobalSolarEclipseInfo](-global-solar-eclipse-info/index.md) for more information. To find a series of solar eclipses, call this function once, then keep calling [nextGlobalSolarEclipse](next-global-solar-eclipse.md) as many times as desired, passing in the peak value returned from the previous call.
See [globalSolarEclipsesAfter](global-solar-eclipses-after.md) for convenient iteration of consecutive eclipses.
#### Return
Information about the first solar eclipse after startTime.
## Parameters
| | |
|---|---|
| startTime | The date and time for starting the search for a solar eclipse. |