def test_french_republican_schematic_madler(self):
     self.assertEqual(self.j,
                      fr.to_jd(*fr.from_jd(self.j, method=128), method=128))
     self.assertEqual(self.x,
                      fr.to_jd(*fr.from_jd(self.x, method=128), method=128))
     self.assertEqual(
         self.jd, fr.to_jd(*fr.from_jd(self.jd, method=128), method=128))
예제 #2
0
    def test_french_republican_schematic_romme(self):
        self.assertEqual(self.gregoriandate, fr.to_gregorian(
            *fr.from_gregorian(*self.gregoriandate, method=100), method=100))

        self.assertEqual(self.jd, fr.to_jd(*fr.from_jd(self.jd, method='romme'), method=100))
        self.assertEqual(self.x, fr.to_jd(*fr.from_jd(self.x, method=100), method=100))
        assert self.j == fr.to_jd(*fr.from_jd(self.j, method=100), method=100)
    def test_french_republican_schematic_continuous(self):
        self.assertEqual(
            gregorian.from_jd(self.jd),
            fr.to_gregorian(*fr.from_jd(self.jd, method=4), method=4))
        self.assertEqual(self.x,
                         fr.to_jd(*fr.from_jd(self.x, method=4), method=4))

        assert self.j == fr.to_jd(*fr.from_jd(self.j, method='continuous'),
                                  method=4)
예제 #4
0
    def test_french_republican_schematic_romme(self):
        self.assertEqual(
            self.gregoriandate,
            fr.to_gregorian(*fr.from_gregorian(*self.gregoriandate, method=100), method=100),
        )

        self.assertEqual(self.jd, fr.to_jd(*fr.from_jd(self.jd, method='romme'), method=100))
        self.assertEqual(self.x, fr.to_jd(*fr.from_jd(self.x, method=100), method=100))
        assert self.j == fr.to_jd(*fr.from_jd(self.j, method=100), method=100)
예제 #5
0
    def test_french_republican(self):
        assert self.jd == fr.to_jd(*fr.from_jd(self.jd))
        assert fr.from_gregorian(2014, 6, 14) == (222, 9, 26)
        assert (2014, 6, 14) == fr.to_gregorian(222, 9, 26)

        assert (3, 13, 6) == fr.from_gregorian(1795, 9, 22)

        for jd in range(2378822, 2488395, 2000):
            self.assertEqual(jd + 0.5, gregorian.to_jd(*gregorian.from_jd(jd + 0.5)))
예제 #6
0
    def test_french_republican(self):
        assert self.jd == fr.to_jd(*fr.from_jd(self.jd))
        assert fr.from_gregorian(2014, 6, 14) == (222, 9, 26)
        assert (2014, 6, 14) == fr.to_gregorian(222, 9, 26)

        assert (3, 13, 6) == fr.from_gregorian(1795, 9, 22)

        for jd in range(2378822, 2488395, 2000):
            self.assertEqual(jd + 0.5, gregorian.to_jd(*gregorian.from_jd(jd + 0.5)))
    def test_french_republican_famous_dates(self):
        self.assertEqual(gregorian.to_jd(1793, 9, 22), fr.to_jd(2, 1, 1))

        # 9 Thermidor II
        self.assertEqual(gregorian.to_jd(1794, 7, 27), fr.to_jd(2, 11, 9))

        # 18 Brumaire An VIII
        assert gregorian.to_jd(1799, 11, 9) == fr.to_jd(8, 2, 18)

        assert fr.to_jd(2, 9, 22) == gregorian.to_jd(1794, 6, 10)
        assert fr.to_jd(4, 1, 13) == gregorian.to_jd(1795, 10, 5)
        assert fr.to_gregorian(5, 12, 18) == (1797, 9, 4)
        assert fr.to_jd(6, 8, 22) == gregorian.to_jd(1798, 5, 11)

        assert (2, 9, 22) == fr.from_gregorian(1794, 6, 10)
        assert (4, 1, 13) == fr.from_gregorian(1795, 10, 5)
        assert (5, 12, 18) == fr.from_gregorian(1797, 9, 4)
        assert (6, 8, 22) == fr.from_gregorian(1798, 5, 11)

        # Coup of 30 Prairial VII
        self.assertEqual(fr.to_gregorian(7, 9, 30), (1799, 6, 18))
예제 #8
0
    def test_french_republican_famous_dates(self):
        self.assertEqual(gregorian.to_jd(1793, 9, 22), fr.to_jd(2, 1, 1))

        # 9 Thermidor II
        self.assertEqual(gregorian.to_jd(1794, 7, 27), fr.to_jd(2, 11, 9))

        # 18 Brumaire An VIII
        assert gregorian.to_jd(1799, 11, 9) == fr.to_jd(8, 2, 18)

        assert fr.to_jd(2, 9, 22) == gregorian.to_jd(1794, 6, 10)
        assert fr.to_jd(4, 1, 13) == gregorian.to_jd(1795, 10, 5)
        assert fr.to_gregorian(5, 12, 18) == (1797, 9, 4)
        assert fr.to_jd(6, 8, 22) == gregorian.to_jd(1798, 5, 11)

        assert (2, 9, 22) == fr.from_gregorian(1794, 6, 10)
        assert (4, 1, 13) == fr.from_gregorian(1795, 10, 5)
        assert (5, 12, 18) == fr.from_gregorian(1797, 9, 4)
        assert (6, 8, 22) == fr.from_gregorian(1798, 5, 11)

        # Coup of 30 Prairial VII
        self.assertEqual(fr.to_gregorian(7, 9, 30), (1799, 6, 18))
예제 #9
0
    def test_french_republican_schematic_continuous(self):
        self.assertEqual(gregorian.from_jd(self.jd), fr.to_gregorian(*fr.from_jd(self.jd, method=4), method=4))
        self.assertEqual(self.x, fr.to_jd(*fr.from_jd(self.x, method=4), method=4))

        assert self.j == fr.to_jd(*fr.from_jd(self.j, method='continuous'), method=4)
예제 #10
0
 def test_french_republican_schematic_madler(self):
     self.assertEqual(self.j, fr.to_jd(*fr.from_jd(self.j, method=128), method=128))
     self.assertEqual(self.x, fr.to_jd(*fr.from_jd(self.x, method=128), method=128))
     self.assertEqual(self.jd, fr.to_jd(*fr.from_jd(self.jd, method=128), method=128))