<commit_before>// time.h -- tick tick

#ifndef TIME_H
#define TIME_H

#include <string>
using namespace std;

class Time
{
  // Content.
private:
  struct Implementation;
  Implementation& impl;
    
  // Extract.
public:
  int year () const;
  int month () const;
  int week () const;
  int yday () const;
  int mday () const;
  int wday () const;		// 0=monday, 6=sunday.
  int hour () const;

  // Simulate. 
public:
  void tick_hour (int hours = 1);
  void tick_day (int days = 1);

  // Convert.
public:
  static string month_name (int month);
  static string wday_name (int wday);
  static int month_number (string name);
  static int wday_number (string day);
  static int mday2yday (int year, int month, int mday);
  static int yday2mday (int year, int yday);
  static int yday2wday (int year, int yday); // 0=monday, 6=sunday.
  static int yday2month (int year, int yday);
  static int yday2week (int year, int yday);

  // Test.
  static bool leap (int year);
  static int month_length (int year, int month);
  static bool valid (int year, int month, int mday, int hour = 0);
  static int days_between (const Time& first, const Time& last);
  static int hours_between (const Time& first, const Time& last);

  bool operator== (const Time&);
  bool operator!= (const Time&);
  bool operator<  (const Time&);
  bool operator<= (const Time&);
  bool operator>= (const Time&);
  bool operator>  (const Time&);

  // Construct.
public:
  const Time& operator= (const Time&);
  Time (int year, int month, int mday, int hour);
  Time (const Time&);
  ~Time ();
};

#endif // TIME_H
<commit_msg>Make operators const.<commit_after>// time.h -- tick tick

#ifndef TIME_H
#define TIME_H

#include <string>
using namespace std;

class Time
{
  // Content.
private:
  struct Implementation;
  Implementation& impl;
    
  // Extract.
public:
  int year () const;
  int month () const;
  int week () const;
  int yday () const;
  int mday () const;
  int wday () const;		// 0=monday, 6=sunday.
  int hour () const;

  // Simulate. 
public:
  void tick_hour (int hours = 1);
  void tick_day (int days = 1);

  // Convert.
public:
  static string month_name (int month);
  static string wday_name (int wday);
  static int month_number (string name);
  static int wday_number (string day);
  static int mday2yday (int year, int month, int mday);
  static int yday2mday (int year, int yday);
  static int yday2wday (int year, int yday); // 0=monday, 6=sunday.
  static int yday2month (int year, int yday);
  static int yday2week (int year, int yday);

  // Test.
  static bool leap (int year);
  static int month_length (int year, int month);
  static bool valid (int year, int month, int mday, int hour = 0);
  static int days_between (const Time& first, const Time& last);
  static int hours_between (const Time& first, const Time& last);

  bool operator== (const Time&) const;
  bool operator!= (const Time&) const;
  bool operator<  (const Time&) const;
  bool operator<= (const Time&) const;
  bool operator>= (const Time&) const;
  bool operator>  (const Time&) const;

  // Construct.
public:
  const Time& operator= (const Time&);
  Time (int year, int month, int mday, int hour);
  Time (const Time&);
  ~Time ();
};

#endif // TIME_H

{'fraction_non_alphanumeric': 0.12391841779975278, 'fraction_numerical': 0.007416563658838072, 'mean_word_length': 3.4100817438692097, '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': '3117088', 'n_tokens_mistral': 1117, 'n_tokens_neox': 1084, 'n_words': 424}