mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-01-05 22:17:48 -05:00
3.1 KiB
3.1 KiB
//astronomy/io.github.cosinekitty.astronomy/Time
Time
class Time : Comparable<Time>
A date and time used for astronomical calculations.
Constructors
| Time fun Time(ut: Double) |
|
| Time fun Time(year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Double) Creates a Time object from a UTC year, month, day, hour, minute and second. |
Types
| Name | Summary |
|---|---|
| Companion object Companion |
Functions
| Name | Summary |
|---|---|
| addDays fun addDays(days: Double): Time Calculates the sum or difference of an Time with a specified floating point number of days. |
|
| compareTo open operator override fun compareTo(other: Time): Int Compares the chronological order of two Time values. |
|
| nutationEps fun nutationEps(): Double |
|
| nutationPsi fun nutationPsi(): Double |
|
| toDateTime fun toDateTime(): DateTime Resolves this Time into year, month, day, hour, minute, second. |
|
| toMillisecondsSince1970 fun toMillisecondsSince1970(): Long Converts this Time to the integer number of millseconds since 1970. |
|
| toString open override fun toString(): String Converts this Time to ISO 8601 format, expressed in UTC with millisecond resolution. |
Properties
| Name | Summary |
|---|---|
| tt val tt: Double Terrestrial Time days since noon on January 1, 2000. |
|
| ut val ut: Double UT1/UTC number of days since noon on January 1, 2000. |