core/src/main/java/org/jruby/ext/date/RubyDate.java
@JRubyMethod(name = "day_fraction")
    public RubyNumeric day_fraction(ThreadContext context) { // Rational(millis, 86_400_000)
        long ms = dt.getSecondOfDay() * 1000L + dt.getMillisOfSecond();
        if (subMillisDen == 1) {
            return (RubyNumeric) RubyRational.newRationalCanonicalize(context, ms + subMillisNum, DAY_MS);
        }
        final Ruby runtime = context.runtime;
        RubyNumeric sum = RubyRational.newRational(runtime, ms, 1).op_plus(context, subMillis(runtime));
        return sum.convertToRational().op_div(context, RubyFixnum.newFixnum(runtime, DAY_MS));
    }
// Get any fractional day part of the date.
Get any fractional day part of the date.
Get any fractional day part of the date .
@JRubyMethod(name = "day_fraction")
    public RubyNumeric day_fraction(ThreadContext context) { 
        long ms = dt.getSecondOfDay() * 1000L + dt.getMillisOfSecond();
        if (subMillisDen == 1) {
            return (RubyNumeric) RubyRational.newRationalCanonicalize(context, ms + subMillisNum, DAY_MS);
        }
        final Ruby runtime = context.runtime;
        RubyNumeric sum = RubyRational.newRational(runtime, ms, 1).op_plus(context, subMillis(runtime));
        return sum.convertToRational().op_div(context, RubyFixnum.newFixnum(runtime, DAY_MS));
    }
@ JRubyMethod ( name = "day_fraction" ) public RubyNumeric day_fraction ( ThreadContext context ) { long ms = dt . getSecondOfDay ( ) * 1000L + dt . getMillisOfSecond ( ) ; if ( subMillisDen == 1 ) { return ( RubyNumeric ) RubyRational . newRationalCanonicalize ( context , ms + subMillisNum , DAY_MS ) ; } final Ruby runtime = context . runtime ; RubyNumeric sum = RubyRational . newRational ( runtime , ms , 1 ) . op_plus ( context , subMillis ( runtime ) ) ; return sum . convertToRational ( ) . op_div ( context , RubyFixnum . newFixnum ( runtime , DAY_MS ) ) ; }
Get any fractional day part of the date.
Get any fractional day part of the date .
// Rational(millis, 86_400_000)