<commit_before>"use strict";
/* -------------------------------------------------------------------
 * Require Statements << Keep in alphabetical order >>
 * ---------------------------------------------------------------- */

//

/* =============================================================================
 * 
 * Common Utilities
 *  
 * ========================================================================== */

var Common = module.exports;

/* -------------------------------------------------------------------
 * Public Static Methods << Keep in alphabetical order >>
 * ---------------------------------------------------------------- */

/**
 * @param month {number} The zero-indexed month.
 * @param [year] {number}
 * @returns {number}
 */
Common.daysInMonth = function (month, year)
{
	if (month < 0)
		month = 12 + month;
	
	switch (month)
	{
		case 0:
		case 2:
		case 4:
		case 6:
		case 7:
		case 9:
		case 11:
			return 31;
		case 3:
		case 5:
		case 8:
		case 10:
			return 30;
		case 1:
			if (!year)<commit_msg>Decrement year if past month is from the previous year.<commit_after>"use strict";
/* -------------------------------------------------------------------
 * Require Statements << Keep in alphabetical order >>
 * ---------------------------------------------------------------- */

//

/* =============================================================================
 * 
 * Common Utilities
 *  
 * ========================================================================== */

var Common = module.exports;

/* -------------------------------------------------------------------
 * Public Static Methods << Keep in alphabetical order >>
 * ---------------------------------------------------------------- */

/**
 * @param month {number} The zero-indexed month.
 * @param [year] {number}
 * @returns {number}
 */
Common.daysInMonth = function (month, year)
{
	if (month < 0)
	{
		month = 12 + month;
		if (year)
			year--;
	}
	
	switch (month)
	{
		case 0:
		case 2:
		case 4:
		case 6:
		case 7:
		case 9:
		case 11:
			return 31;
		case 3:
		case 5:
		case 8:
		case 10:
			return 30;
		case 1:
			if (!year)
{'fraction_non_alphanumeric': 0.47414997671169073, 'fraction_numerical': 0.019562179785747556, 'mean_word_length': 1.3475409836065573, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '1491201', 'n_tokens_mistral': 615, 'n_tokens_neox': 496, 'n_words': 157}