Code Duplication    Length = 17-17 lines in 2 locations

src/CalendarSettings/Julian.php 2 locations

@@ 25-41 (lines=17) @@
22
  *
23
  *\_________________________________________________________/
24
  */
25
   'convert_to' => function ($date_time) {
26
27
     $year = $date_time->format('Y');
28
29
     $month = $date_time->format('m');
30
31
     $day = $date_time->format('d');
32
33
     $jd = gregoriantojd($month, $day, $year);
34
35
     $date = explode('/', jdtojulian( $jd ));
36
37
     $date_time->setDate($date[2], $date[0], $date[1]);
38
39
     return $date_time;
40
41
   },
42
43
    /************************************************************
44
    *                        Convert From
@@ 51-67 (lines=17) @@
48
    *
49
    *\_________________________________________________________/
50
    */
51
    'convert_from' => function ($date_time) {
52
53
      $year = $date_time->format('Y');
54
55
      $month = $date_time->format('m');
56
57
      $day = $date_time->format('d');
58
59
      $date = juliantojd( $month, $day, $year );
60
61
      $date = explode('/', JDToGregorian( $date ) );
62
63
      $date_time->setDate($date[2], $date[0], $date[1]);
64
65
      return $date_time;
66
67
    },
68
69
    /************************************************************
70
    *               Shorthand for Julian calendar