<commit_before>var expressos = new function() {

	this.calculate_period = function(options){

		const data = options.data
		const total_days = data.total_days

		const years 		= Math.floor(total_days / 365)
		const years_days 	= total_days - (years * 365)
		const total_months 	= Math.floor(total_days / 30.42)

		let months 	= Math.floor(years_days / 30.42)
		let days 	= Math.floor(years_days - (months * 30.42))

		let period = []


		if(years > 0 && options.years === true){
			const year_label = years == 1 ? get_label["anyo"] : get_label["anyos"]
			const year_value = (options.label===true) ? years + ' ' + year_label : years
			period.push(year_value)	
		}

		if(months > 0 && options.months === true){
			const months_label = months == 1 ? get_label["mes"] : get_label["meses"]
			let months_value = ""
			if(options.total === true){
				months_value = (options.label===true) ? total_months + ' ' + months_label : total_months
			}else{
				months_value = (options.label===true) ? months + ' ' + months_label : months
			}
			period.push(months_value)	
		}

		if(days > 0 && options.days === true){
			const days_label = days == 1 ? get_label["dia"] : get_label["dias"]
			let days_value = ""
			if(options.total === true){
				days_value = (options.label===true) ? total_days + ' ' + days_label : total_days
			}else{
				days_value = (options.label===true) ? days + ' ' + days_label : days
				
			}
			period.push(days_value)	
		}

		const result = period.join(', ')


		return result

	}

	this.calculate_import_major = function(options){

		const data = options.data
		const total_days = data.total_days
		if(total_days === 0){
			return 0
		}

		const years 		= Math.floor(total_days / 365)
		const years_days 	= total_days - (years * 365)
		let total_months 	= Math.floor(total_days / 30.42)

		let months 	= Math.floor(years_days / 30.42)
		let days 	= Math.floor(years_days - (months * 30.42))

		let cal_import = 0
		
		if(days > 0){
			total_months = total_months + 1
		}
		if(total_months <= 6){
			cal_import = 150000
		}else{
			cal_import = ((total_months - 6) * 28000) +150000
		}
		if (cal_import > 1000000) {
			cal_import = 1000000
		}
		
		const result = cal_import

		return result
	}

	this.calculate_import_minor = function(options){

		const data = options.data
		const total_days = data.total_days
		if(total_days === 0){
			return 0
		}

		const years 		= Math.floor(total_days / 365)
		const years_days 	= total_days - (years * 365)
		let total_months 	= Math.floor(total_days / 30.42)

		let months 	= Math.floor(years_days / 30.42)
		let days 	= Math.floor(years_days - (months * 30.42))

		let cal_import = 0
		
		if(days > 0){
			total_months = total_months + 1
		}
		if(total_months <= 6){
			cal_import = 900
		}else{
			cal_import = ((total_months - 6) * 170) +900
		}<commit_msg>Fix month aprox of division to more close round<commit_after>var expressos = new function() {

	this.calculate_period = function(options){

		const data = options.data
		const total_days = data.total_days

		const years 		= Math.floor(total_days / 365)
		const years_days 	= total_days - (years * 365)
		const total_months 	= Math.floor(total_days / 30.42)

		const check_months = total_days / 30.42
		const rest_months = check_months - total_months
		
		if(rest_months > 0.99){total_months = total_months + 1}


		let months 	= Math.floor(years_days / 30.42)
		let days 	= Math.floor(years_days - (months * 30.42))

		let period = []


		if(years > 0 && options.years === true){
			const year_label = years == 1 ? get_label["anyo"] : get_label["anyos"]
			const year_value = (options.label===true) ? years + ' ' + year_label : years
			period.push(year_value)	
		}

		if(months > 0 && options.months === true){
			const months_label = months == 1 ? get_label["mes"] : get_label["meses"]
			let months_value = ""
			if(options.total === true){
				months_value = (options.label===true) ? total_months + ' ' + months_label : total_months
			}else{
				months_value = (options.label===true) ? months + ' ' + months_label : months
			}
			period.push(months_value)	
		}

		if(days > 0 && options.days === true){
			const days_label = days == 1 ? get_label["dia"] : get_label["dias"]
			let days_value = ""
			if(options.total === true){
				days_value = (options.label===true) ? total_days + ' ' + days_label : total_days
			}else{
				days_value = (options.label===true) ? days + ' ' + days_label : days
				
			}
			period.push(days_value)	
		}

		const result = period.join(', ')


		return result

	}

	this.calculate_import_major = function(options){

		const data = options.data
		const total_days = data.total_days
		if(total_days === 0){
			return 0
		}

		const years 		= Math.floor(total_days / 365)
		const years_days 	= total_days - (years * 365)
		let total_months 	= Math.floor(total_days / 30.42)

		const check_months = total_days / 30.42
		const rest_months = check_months - total_months
		
		if(rest_months > 0.99){total_months = total_months + 1}

		let months 	= Math.floor(years_days / 30.42)
		let days 	= Math.floor(years_days - (months * 30.42))
		let cal_import = 0
		
		if(days > 0){
			total_months = total_months + 1
		}
		if(total_months <= 6){
			cal_import = 150000
		}else{
			cal_import = ((total_months - 6) * 28000) +150000
		}
		if (cal_import > 1000000) {
			cal_import = 1000000
		}
		
		const result = cal_import

		return result
	}

	this.calculate_import_minor = function(options){

		const data = options.data
		const total_days = data.total_days
		if(total_days === 0){
			return 0
		}

		const years 		= Math.floor(total_days / 365)
		const years_days 	= total_days - (years * 365)
		let total_months 	= Math.floor(total_days / 30.42)

		const check_months = total_days / 30.42
		const rest_months = check_months -total_months
		
		if(rest_months > 0.99){total_months +1}

		let months 	= Math.floor(years_days / 30.42)
		let days 	= Math.floor(years_days - (months * 30.42))

		let cal_import = 0
		
		if(days > 0){
			total_months = total_months + 1
		}
		if(total_months <= 6){
			cal_import = 900
		}else{
			cal_import = ((total_months - 6) * 170) +900
		}
{'fraction_non_alphanumeric': 0.13093877551020408, 'fraction_numerical': 0.04114285714285714, 'mean_word_length': 3.144790257104195, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 18, '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': '3007641', 'n_tokens_mistral': 2772, 'n_tokens_neox': 2149, 'n_words': 491}