day-fraction
ErrorsCollection

day-fraction

Synthesised documentation from type/DateTime

From type/DateTime

See Original text in context

method day-fraction(DateTime:D: --> Real:D)

Returns the instant's time as a fraction of a 24-hour day.

say DateTime.new('2021-12-24T12:23:00.43Z').day-fraction# OUTPUT: «0.5159772␤»

Notice the day-fraction value is the same as the fractional part of the modified-julian-date for the same instant.