Code Duplication    Length = 7-7 lines in 2 locations

src/Shim.php 2 locations

@@ 654-660 (lines=7) @@
651
     *
652
     * @return string A string of the form "month/day/year"
653
     */
654
    public static function jdToGregorian($julian_day)
655
    {
656
        // PHP has different limits on 32 and 64 bit systems.
657
        $MAX_JD = PHP_INT_SIZE == 4 ? 536838866 : 2305843009213661906;
658
659
        return self::jdToCalendar(self::$gregorian_calendar, $julian_day, 1, $MAX_JD);
660
    }
661
662
    /**
663
     * Converts a Julian day count to a Jewish calendar date.
@@ 707-713 (lines=7) @@
704
     *
705
     * @return string A string of the form "month/day/year"
706
     */
707
    public static function jdToJulian($julian_day)
708
    {
709
        // PHP has different limits on 32 and 64 bit systems.
710
        $MAX_JD = PHP_INT_SIZE == 4 ? 536838829 : 784368370349;
711
712
        return self::jdToCalendar(self::$julian_calendar, $julian_day, 1, $MAX_JD);
713
    }
714
715
    /**
716
     * Convert Julian Day to Unix timestamp.