<commit_before>package titleservice

import (
	"fmt"
	"time"
)

// Time formats a hour and minute into the MMS Time format
//
// Format
//
// 0200-2559 (The leading zero is optional)
//
// Examples
//
//   Time(23,45) = 2345 (day 1)
//   Time(0,15)  = 2415 (day 1)
//   Time(1,45)  = 2545 (day 1)
//   Time(2,0)   = 0200 (day 2)
//
func Time(hour, minute int) string {
	if hour < 2 {
		return fmt.Sprintf("%02d%02d", hour+24, minute)
	}

	return fmt.Sprintf("%02d%02d", hour, minute)
}

// Date formats a year, month, day into the format YYYYMMDD
func Date(year int, month time.Month, day int) string {
	if year > 0 && month > 0 && month < 13 && day > 0 && day < 32 {
		return fmt.Sprintf("%04d%02d%02d", year, month, day)
	}

	return ""
}

// DateAtTime returns the date string for the provided time.Time
func DateAtTime(t time.Time) string {
	return Date(t.Date())
}<commit_msg>Remove format documentation heading<commit_after>package titleservice

import (
	"fmt"
	"time"
)

// Time formats a hour and minute into the MMS Time format
//
// 0200-2559 (The leading zero is optional)
//
// Examples
//
//   Time(23,45) = 2345 (day 1)
//   Time(0,15)  = 2415 (day 1)
//   Time(1,45)  = 2545 (day 1)
//   Time(2,0)   = 0200 (day 2)
//
func Time(hour, minute int) string {
	if hour < 2 {
		return fmt.Sprintf("%02d%02d", hour+24, minute)
	}

	return fmt.Sprintf("%02d%02d", hour, minute)
}

// Date formats a year, month, day into the format YYYYMMDD
func Date(year int, month time.Month, day int) string {
	if year > 0 && month > 0 && month < 13 && day > 0 && day < 32 {
		return fmt.Sprintf("%04d%02d%02d", year, month, day)
	}

	return ""
}

// DateAtTime returns the date string for the provided time.Time
func DateAtTime(t time.Time) string {
	return Date(t.Date())
}
{'fraction_non_alphanumeric': 0.15715093273035613, 'fraction_numerical': 0.07235726399095534, 'mean_word_length': 3.125874125874126, 'pattern_counts': {'":': 0, '<': 9, '<?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': '2185215', 'n_tokens_mistral': 747, 'n_tokens_neox': 653, 'n_words': 214}