Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 2.97 KB

index.md

File metadata and controls

32 lines (23 loc) · 2.97 KB

//astronomy/io.github.cosinekitty.astronomy/DateTime

DateTime

class DateTime(year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Double)

A universal time resolved into UTC calendar date and time fields.

Constructors

DateTime
fun DateTime(year: Int, month: Int, day: Int, hour: Int, minute: Int, second: Double)

Functions

Name Summary
toDays
fun toDays(): Double
Convert this date and time to the floating point number of days since the J2000 epoch.
toString
open override fun toString(): String
Converts this DateTime to ISO 8601 format, expressed in UTC with millisecond resolution.
toTime
fun toTime(): Time
Convert this date and time to a Time value that can be used for astronomy calculations.

Properties

Name Summary
day
val day: Int
The day of the month, 1..31.
hour
val hour: Int
The hour of the day, 0..23.
minute
val minute: Int
The minute value 0..59.
month
val month: Int
The month value 1=January, ..., 12=December.
second
val second: Double
The floating point second value in the half-open range [0, 60).
year
val year: Int
The integer year value.