<commit_before>import { INVALID_DAY, INVALID_MONTH, J0000 } from '../../Const';
import { EthiopicCalendar as cal } from '../../calendar/EthiopicCalendar';

const dates = [
  { jdn: -214193 + J0000, date: { year: -594, month: 12, day:  6 } },
  { jdn:  -61387 + J0000, date: { year: -175, month:  4, day: 12 } },
  { jdn:   25469 + J0000, date: { year:   63, month:  1, day: 29 } },
  { jdn:   49217 + J0000, date: { year:  128, month:  2, day:  5 } },
  { jdn:  171307 + J0000, date: { year:  462, month:  5, day: 12 } },
  { jdn:  210155 + J0000, date: { year:  568, month:  9, day: 23 } },
  { jdn:  253427 + J0000, date: { year:  687, month:  3, day: 11 } },
  { jdn:  369740 + J0000, date: { year: 1005, month:  8, day: 24 } },
  { jdn:  400085 + J0000, date: { year: 1088, month:  9, day: 23 } },
  { jdn:  434355 + J0000, date: { year: 1182, month:  7, day: 20 } },
  { jdn:  452605 + J0000, date: { year: 1232, month:  7, day:  7 } },
  { jdn:  470160 + J0000, date: { year: 1280, month:  7, day: 30 } },
  { jdn:  473837 + J0000, date: { year: 1290, month:  8, day: 25 } },
  { jdn:  507850 + J0000, date: { year: 1383, month: 10, day: 10 } },
  { jdn:  524156 + J0000, date: { year: 1428, month:  5, day: 29 } },
  { jdn:  544676 + J0000, date: { year: 1484, month:  8, day:  5 } },
  { jdn:  567118 + J0000, date: { year: 1546, month:  1, day: 12 } },
  { jdn:  569477 + J0000, date: { year: 1552, month:  6, day: 29 } },
  { jdn:  601716 + J0000, date: { year: 1640, month: 10, day:  6 } },
  { jdn:  613424 + J0000, date: { year: 1672, month: 10, day: 26 } },
  { jdn:  626596 + J0000, date: { year: 1708, month: 11, day: 19 } },
  { jdn:  645554 + J0000, date: { year: 1760, month: 10, day: 14 } },
  { jdn:  664224 + J0000, date: { year: 1811, month: 11, day: 27 } },
  { jdn:  671401 + J0000, date: { year: 1831, month:  7, day: 19 } },
  { jdn:  694799 + J0000, date: { year: 1895, month:  8, day: 11 } },
  { jdn:  704424 + J0000, date: { year: 1921, month: 12, day: 19 } },
  { jdn:  708842 + J0000, date: { year: 1934, month:  1, day: 19 } },
  { jdn:  709409 + J0000, date: { year: 1935, month:  8, day: 11 } },
  { jdn:  709580 + J0000, date: { year: 1936, month:  1, day: 26 } },
  { jdn:  727274 + J0000, date: { year: 1984, month:  7, day:  8 } },
  { jdn:  728714 + J0000, date: { year: 1988, month:  6, day: 17 } },
  { jdn:  744313 + J0000, date: { year: 2031, month:  3, day:  1 } },
  { jdn:  764652 + J0000, date: { year: 2086, month: 11, day: 11 } },
];

describe ('Ethiopic calendar spec', () => {
  it ('should convert an Ethiopic date to Julian day', () => {
    dates.forEach (({ jdn, date }) => {
      const actual = cal.toJdn (date.year, date.month, date.day);

      expect (actual).toBe (jdn);
    });
  });
<commit_msg>Calculate real JDN.<commit_after>import { INVALID_DAY, INVALID_MONTH } from '../../Const';
import { EthiopicCalendar as cal } from '../../calendar/EthiopicCalendar';

const dates = [
  { jdn: 1507231.5, date: { year: -594, month: 12, day:  6 } },
  { jdn: 1660037.5, date: { year: -175, month:  4, day: 12 } },
  { jdn: 1746893.5, date: { year:   63, month:  1, day: 29 } },
  { jdn: 1770641.5, date: { year:  128, month:  2, day:  5 } },
  { jdn: 1892731.5, date: { year:  462, month:  5, day: 12 } },
  { jdn: 1931579.5, date: { year:  568, month:  9, day: 23 } },
  { jdn: 1974851.5, date: { year:  687, month:  3, day: 11 } },
  { jdn: 2091164.5, date: { year: 1005, month:  8, day: 24 } },
  { jdn: 2121509.5, date: { year: 1088, month:  9, day: 23 } },
  { jdn: 2155779.5, date: { year: 1182, month:  7, day: 20 } },
  { jdn: 2174029.5, date: { year: 1232, month:  7, day:  7 } },
  { jdn: 2191584.5, date: { year: 1280, month:  7, day: 30 } },
  { jdn: 2195261.5, date: { year: 1290, month:  8, day: 25 } },
  { jdn: 2229274.5, date: { year: 1383, month: 10, day: 10 } },
  { jdn: 2245580.5, date: { year: 1428, month:  5, day: 29 } },
  { jdn: 2266100.5, date: { year: 1484, month:  8, day:  5 } },
  { jdn: 2288542.5, date: { year: 1546, month:  1, day: 12 } },
  { jdn: 2290901.5, date: { year: 1552, month:  6, day: 29 } },
  { jdn: 2323140.5, date: { year: 1640, month: 10, day:  6 } },
  { jdn: 2334848.5, date: { year: 1672, month: 10, day: 26 } },
  { jdn: 2348020.5, date: { year: 1708, month: 11, day: 19 } },
  { jdn: 2366978.5, date: { year: 1760, month: 10, day: 14 } },
  { jdn: 2385648.5, date: { year: 1811, month: 11, day: 27 } },
  { jdn: 2392825.5, date: { year: 1831, month:  7, day: 19 } },
  { jdn: 2416223.5, date: { year: 1895, month:  8, day: 11 } },
  { jdn: 2425848.5, date: { year: 1921, month: 12, day: 19 } },
  { jdn: 2430266.5, date: { year: 1934, month:  1, day: 19 } },
  { jdn: 2430833.5, date: { year: 1935, month:  8, day: 11 } },
  { jdn: 2431004.5, date: { year: 1936, month:  1, day: 26 } },
  { jdn: 2448698.5, date: { year: 1984, month:  7, day:  8 } },
  { jdn: 2450138.5, date: { year: 1988, month:  6, day: 17 } },
  { jdn: 2465737.5, date: { year: 2031, month:  3, day:  1 } },
  { jdn: 2486076.5, date: { year: 2086, month: 11, day: 11 } },
];

describe ('Ethiopic calendar spec', () => {
  it ('should convert an Ethiopic date to Julian day', () => {
    dates.forEach (({ jdn, date }) => {
      const actual = cal.toJdn (date.year, date.month, date.day);

      expect (actual).toBe (jdn);
    });
  });

{'fraction_non_alphanumeric': 0.20560045104303704, 'fraction_numerical': 0.19639165570381506, 'mean_word_length': 2.7584745762711864, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4872995', 'n_tokens_mistral': 3020, 'n_tokens_neox': 2300, 'n_words': 706}