In DateTime§
See primary documentation in context for method day-fraction.
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.
Also note that leap seconds may cause some variations from expected values:
for 30, 31 { say DateTime.new(2016,12,$_,12,0,0).day-fraction } # OUTPUT: «0.50.499994»
Available as of the 2021.04 Rakudo compiler release.