<commit_before>/**
 * Sapelli data collection platform: http://sapelli.org
 * 
 * Copyright 2012-2014 University College London - ExCiteS group
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */

package uk.ac.ucl.excites.sapelli.shared.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;
import java.util.TimeZone;

import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;

import uk.ac.ucl.excites.sapelli.storage.types.TimeStamp;

/**
 * @author mstevens, <NAME>
 *
 */
public final class TimeUtils
{

	public static final DateTimeFormatter ISOWithMSFormatter = ISODateTimeFormat.dateTime();
	public static final DateTimeFormatter ISOWithoutMSFormatter = ISODateTimeFormat.dateTimeNoMillis();
	public static final DateTimeFormatter FileTimestampFormatter = DateTimeFormat.forPattern("yyyy-MM-dd'T'HHmmss");
	public static final DateTimeFormatter PrettyTimestampWithoutMSFormatter = DateTimeFormat.forPattern("yyyy-MM-dd' 'HH:mm:ss");
	public static final DateTimeFormatter PrettyTimestampWithMSFormatter = DateTimeFormat.forPattern("yyyy-MM-dd' 'HH:mm:ss.SSS");

	private TimeUtils() {}

	static public Calendar getCalendar(int year, int month, int day, TimeZone timeZone)
	{
		Calendar date = Calendar.getInstance();
		date.clear();
		date.setTimeZone(timeZone);
		date.set(year, month, day);
		return date;<commit_msg>Changed timeformat on log's filename<commit_after>/**
 * Sapelli data collection platform: http://sapelli.org
 * 
 * Copyright 2012-2014 University College London - ExCiteS group
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */

package uk.ac.ucl.excites.sapelli.shared.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Locale;
import java.util.TimeZone;

import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;

import uk.ac.ucl.excites.sapelli.storage.types.TimeStamp;

/**
 * @author mstevens, <NAME>
 *
 */
public final class TimeUtils
{

	public static final DateTimeFormatter ISOWithMSFormatter = ISODateTimeFormat.dateTime();
	public static final DateTimeFormatter ISOWithoutMSFormatter = ISODateTimeFormat.dateTimeNoMillis();
	public static final DateTimeFormatter FileTimestampFormatter = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH.mm.ss");
	public static final DateTimeFormatter PrettyTimestampWithoutMSFormatter = DateTimeFormat.forPattern("yyyy-MM-dd' 'HH:mm:ss");
	public static final DateTimeFormatter PrettyTimestampWithMSFormatter = DateTimeFormat.forPattern("yyyy-MM-dd' 'HH:mm:ss.SSS");

	private TimeUtils() {}

	static public Calendar getCalendar(int year, int month, int day, TimeZone timeZone)
	{
		Calendar date = Calendar.getInstance();
		date.clear();
		date.setTimeZone(timeZone);
		date.set(year, month, day);
		return date;
{'fraction_non_alphanumeric': 0.09553504614617112, 'fraction_numerical': 0.005986530306809678, 'mean_word_length': 5.030075187969925, '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': '3522002', 'n_tokens_mistral': 1168, 'n_tokens_neox': 1117, 'n_words': 349}