<commit_before>/*
 *    Debrief - the Open Source Maritime Analysis Application
 *    http://debrief.info
 *
 *    (C) 2000-2014, PlanetMayo Ltd
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the Eclipse Public License v1.0
 *    (http://www.eclipse.org/legal/epl-v10.html)
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 */
// @Author : <NAME>
// @Project: Debrief 3
// @File   : FormatRNDateTime.java

package MWC.Utilities.TextFormatting;

import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

import MWC.GenericData.HiResDate;

public class DebriefFormatDateTime
{
	private static DateFormat _dfMillis = null;
	private static DateFormat _df = null;
	private static NumberFormat _micros = null;
	private static NumberFormat _millis = null;
	private static final DateFormat FOUR_DIGIT_YEAR_FORMAT = new SimpleDateFormat(
			"yyyyMMdd HHmmss");
	private static final DateFormat TWO_DIGIT_YEAR_FORMAT = new SimpleDateFormat(
			"yyMMdd HHmmss");

	/**
	 * the string which in the past could appear, when the intention of the
	 * software was to store a null string
	 */
	private static final String NULL_DATE_STRING = "691231 235959.999";

	/**
	 * there are also some instances where invalid dates have crept in, possibly
	 * related to Debrief storing 0 and trying to write this to disk. Problem
	 * probably occured during Hi-Res times transition.
	 */
	private static final String INVALID_DATE_STRING = "700101 000000";

	/**
	 * we use static instances of patterns. just initialise them once
	 * 
	 */
	private synchronized static void initialisePatterns()
	{
		if (_dfMillis == null)
		{
			FOUR_DIGIT_YEAR_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT"));
			TWO_DIGIT_YEAR_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT"));<commit_msg>comment out unused variable (to make both legacy projects compiler warning-free)<commit_after>/*
 *    Debrief - the Open Source Maritime Analysis Application
 *    http://debrief.info
 *
 *    (C) 2000-2014, PlanetMayo Ltd
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the Eclipse Public License v1.0
 *    (http://www.eclipse.org/legal/epl-v10.html)
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 */
// @Author : <NAME>
// @Project: Debrief 3
// @File   : FormatRNDateTime.java

package MWC.Utilities.TextFormatting;

import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

import MWC.GenericData.HiResDate;

public class DebriefFormatDateTime
{
	private static DateFormat _dfMillis = null;
	private static DateFormat _df = null;
	private static NumberFormat _micros = null;
	private static NumberFormat _millis = null;
	private static final DateFormat FOUR_DIGIT_YEAR_FORMAT = new SimpleDateFormat(
			"yyyyMMdd HHmmss");
	private static final DateFormat TWO_DIGIT_YEAR_FORMAT = new SimpleDateFormat(
			"yyMMdd HHmmss");

	/**
	 * the string which in the past could appear, when the intention of the
	 * software was to store a null string
	 */
	private static final String NULL_DATE_STRING = "691231 235959.999";

	/**
	 * there are also some instances where invalid dates have crept in, possibly
	 * related to Debrief storing 0 and trying to write this to disk. Problem
	 * probably occured during Hi-Res times transition.
	 */
//	private static final String INVALID_DATE_STRING = "700101 000000";

	/**
	 * we use static instances of patterns. just initialise them once
	 * 
	 */
	private synchronized static void initialisePatterns()
	{
		if (_dfMillis == null)
		{
			FOUR_DIGIT_YEAR_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT"));
			TWO_DIGIT_YEAR_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT"));
{'fraction_non_alphanumeric': 0.08086693078536472, 'fraction_numerical': 0.019109764623630857, 'mean_word_length': 4.073286052009457, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3526294', 'n_tokens_mistral': 1364, 'n_tokens_neox': 1242, 'n_words': 439}