def test_caldat_array(): month, day, year = caldat(np.array([2457533.93068287, 2457533.93068287])) nptest.assert_almost_equal(month, np.array([5, 5])) nptest.assert_almost_equal(day, np.array([25, 25])) nptest.assert_almost_equal(year, np.array([2016, 2016]))
def test_caldat(): month, day, year = caldat(2457533.93068287) assert month == 5 assert day == 25 assert year == 2016