<commit_before>package org.timepedia.chronoscope.client.render.domain;

import org.timepedia.chronoscope.client.util.TimeUnit;
import org.timepedia.chronoscope.client.util.DateFormatter;
import org.timepedia.chronoscope.client.util.date.DateFormatHelper;

/**
 * @author <NAME>
 */
public class HoursTickFormatter extends DateTickFormatter {

  public HoursTickFormatter(DateTickFormatter superFormatter) {
    super("00xx"); // e.g. "12pm"
    this.superFormatter = superFormatter;
    this.subFormatter = new MinutesTickFormatter(this);
    this.possibleTickSteps = new int[] {1, 3, 6, 12};
    this.timeUnitTickInterval = TimeUnit.HOUR;
  }

  @Override
  public String formatTick() {
    DateFormatter hourFormat = DateFormatHelper.getHourFormatter();
    int hourOfDay = Integer.valueOf(hourFormat.format(currTick.getTime()));
      
    switch (hourOfDay) {
      case 0:
        return dateFormat.dayAndMonth(currTick);
      default:
        return dateFormat.hourAndMinute(currTick);
    }
  }

  public int getSubTickStep(int primaryTickStep) {
    switch (primaryTickStep) {
      case 12:
      case 1:
        return 4;
      case 6:
        return 2;
      default:
        return super.getSubTickStep(primaryTickStep);
    }
  }
  
  @Override
  public boolean isBoundary() {
    return currTick.getHour() == 0;
  }

}<commit_msg>put the boundary label of the day in the 00:00 tick<commit_after>package org.timepedia.chronoscope.client.render.domain;

import org.timepedia.chronoscope.client.util.TimeUnit;
import org.timepedia.chronoscope.client.util.date.DateFormatHelper;

/**
 * @author <NAME>
 */
public class HoursTickFormatter extends DateTickFormatter {
  
  public HoursTickFormatter(DateTickFormatter superFormatter) {
    super("00:00"); // e.g. "01:00"
    this.superFormatter = superFormatter;
    this.subFormatter = new MinutesTickFormatter(this);
    this.possibleTickSteps = new int[] {1, 3, 6, 12};
    this.timeUnitTickInterval = TimeUnit.HOUR;
  }
  
  @Override
  public String formatTick() {
    if (0 == Integer.valueOf(DateFormatHelper.getHourFormatter().format(currTick.getTime()))) {
        return dateFormat.dayAndMonth(currTick);
    }
    return dateFormat.hourAndMinute(currTick);
  }

  public int getSubTickStep(int primaryTickStep) {
    switch (primaryTickStep) {
      case 12:
      case 1:
        return 4;
      case 6:
        return 2;
      default:
        return super.getSubTickStep(primaryTickStep);
    }
  }
  
  @Override
  public boolean isBoundary() {
    return 0 == Integer.valueOf(DateFormatHelper.getHourFormatter().format(currTick.getTime()));
  }

}
{'fraction_non_alphanumeric': 0.10755148741418764, 'fraction_numerical': 0.016018306636155607, 'mean_word_length': 3.4991423670668955, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1799031', 'n_tokens_mistral': 850, 'n_tokens_neox': 800, 'n_words': 160}