<commit_before>const date = new Date(2012, 5);
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
const dateTimeFormat = new Intl.DateTimeFormat('en-US', options);

const parts = dateTimeFormat.formatToParts(date);

console.log(parts[0].value);
// expected output: "Friday"

console.log(parts[1].value);
// expected output: ", "

console.log(parts[2].value);
// expected output: "June"

console.log(parts[3].value);
// expected output: " "

console.log(parts[4].value);
// expected output: "1"

console.log(parts[5].value);
// expected output: ", "

console.log(parts[6].value);
// expected output: "2012"<commit_msg>Shortened Intl.DateTimeFormat.formatToParts example<commit_after>const date = new Date(2012, 5);
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
const dateTimeFormat = new Intl.DateTimeFormat('en-US', options);

const parts = dateTimeFormat.formatToParts(date);
const partValues = parts.map(p => p.value);

console.log(partValues);
// expected output: "["Friday", ", ", "June", " ", "1", ", ", "2012"]"
{'fraction_non_alphanumeric': 0.19357798165137616, 'fraction_numerical': 0.024770642201834864, 'mean_word_length': 5.494047619047619, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2279600', 'n_tokens_mistral': 374, 'n_tokens_neox': 355, 'n_words': 83}