<commit_before><?php
/**
 * 
 * @author cmc
 * 
 * @todo add translate if DateTime doesn't translate automatically based on location
 *
 */
class CmcDateHelper {
	
	private $cmcdate; //DateTime
	private $dateWeek; //String
	private $weekStartDate 	= null; //DateTime
	private $weekEndDate	= null; //DateTime
	private $sameWeekMonths	= null; //Boolean
	private $sameWeekYears	= null;
	
	private static $contMark = ' - ';
	
	public function __construct($strDate='') {
		$this->cmcdate = new DateTime($strDate); //will set date to now if no date string
	}
	
	public function YearLabel() {
		return $this->cmcdate->format('Y');
	}
	
	public function MonthYearLabel() {
		return $this->cmcdate->format('F Y');
	}
	
	public function ShortMonthYearLabel() {
		return $this->cmcdate->format('M Y');
	}
	

	public function DayMonthYearLabel() {
		return $this->cmcdate->format('j F Y');
	}
	
	public function DayShortMonthYearLabel() {
		return $this->cmcdate->format('j M Y');
	}
	
	public function WeekLabel() {
		//Year and Month Same
		if ($this->isSameWeekYears() && $this->isSameWeekMonths()) {
			return $this->getWeekStartDate()->format('j') .self::$contMark.
					$this->getWeekEndDate()->format('j F Y');
		//Only Year same
		} elseif ($this->isSameWeekYears()) { 
			return $this->getWeekStartDate()->format('j F') .self::$contMark.
					$this->getWeekEndDate()->format('j F Y');
		}
		
		//Month and Year different
		return $this->getWeekStartDate()->format('j F Y') .self::$contMark.
				$this->getWeekEndDate()->format('j F Y');
		
	}	
	
	public function WeekShortMonthLabel() {
		//Year and Month Same<commit_msg>Add custom separators for DayShortMonthYearLabel<commit_after><?php
/**
 * 
 * @author cmc
 * 
 * @todo add translate if DateTime doesn't translate automatically based on location
 *
 */
class CmcDateHelper {
	
	private $cmcdate; //DateTime
	private $dateWeek; //String
	private $weekStartDate 	= null; //DateTime
	private $weekEndDate	= null; //DateTime
	private $sameWeekMonths	= null; //Boolean
	private $sameWeekYears	= null;
	
	private static $contMark = ' - ';
	
	public function __construct($strDate='') {
		$this->cmcdate = new DateTime($strDate); //will set date to now if no date string
	}
	
	public function YearLabel() {
		return $this->cmcdate->format('Y');
	}
	
	public function MonthYearLabel() {
		return $this->cmcdate->format('F Y');
	}
	
	public function ShortMonthYearLabel() {
		return $this->cmcdate->format('M Y');
	}
	

	public function DayMonthYearLabel() {
		return $this->cmcdate->format('j F Y');
	}
	
	public function DayShortMonthYearLabel($sep=' ') {
		return $this->cmcdate->format("j{$sep}M{$sep}Y");
	}
	
	public function WeekLabel() {
		//Year and Month Same
		if ($this->isSameWeekYears() && $this->isSameWeekMonths()) {
			return $this->getWeekStartDate()->format('j') .self::$contMark.
					$this->getWeekEndDate()->format('j F Y');
		//Only Year same
		} elseif ($this->isSameWeekYears()) { 
			return $this->getWeekStartDate()->format('j F') .self::$contMark.
					$this->getWeekEndDate()->format('j F Y');
		}
		
		//Month and Year different
		return $this->getWeekStartDate()->format('j F Y') .self::$contMark.
				$this->getWeekEndDate()->format('j F Y');
		
	}	
	
	public function WeekShortMonthLabel() {
		//Year and Month Same
{'fraction_non_alphanumeric': 0.1628684290489213, 'fraction_numerical': 0.0, 'mean_word_length': 3.92814371257485, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 55, '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': '6586409', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1062, 'n_words': 267}