<commit_before>/* vim: set ai et ts=4 sw=4: */

#include "rapidjson/document.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/writer.h"
#include "rapidjson/prettywriter.h"
#include <cstdint>
#include <iostream>
#include <sstream>

class Date {
public:
    Date(uint16_t year, uint8_t month, uint8_t day)
      : _year(year)
      , _month(month)
      , _day(day) {
    }

    uint16_t getYear() const {
        return _year;
    }
    uint8_t getMonth() const {
        return _month;
    }
    uint8_t getDay() const {
        return _day;
    }

    Date& setYear(uint16_t year) {
        _year = year;
        return *this;
    }
    Date& setMonth(uint8_t month) {
        _month = month;
        return *this;
    }
    Date& setDay(uint8_t day) {
        _day = day;
        return *this;
    }

    rapidjson::Document toJSON() {
        rapidjson::Document doc;
        auto& allocator = doc.GetAllocator();
        doc.SetArray()
            .PushBack(_year, allocator)
            .PushBack(_month, allocator)
            .PushBack(_day, allocator);
        return doc;
    }

private:
    uint16_t _year;
    uint8_t _month;
    uint8_t _day;
};<commit_msg>clang-format<commit_after>/* vim: set ai et ts=4 sw=4: */

#include "rapidjson/document.h"
#include "rapidjson/prettywriter.h"
#include "rapidjson/stringbuffer.h"
#include "rapidjson/writer.h"
#include <cstdint>
#include <iostream>
#include <sstream>

class Date {
public:
    Date(uint16_t year, uint8_t month, uint8_t day)
      : _year(year)
      , _month(month)
      , _day(day) {
    }

    uint16_t getYear() const {
        return _year;
    }
    uint8_t getMonth() const {
        return _month;
    }
    uint8_t getDay() const {
        return _day;
    }

    Date& setYear(uint16_t year) {
        _year = year;
        return *this;
    }
    Date& setMonth(uint8_t month) {
        _month = month;
        return *this;
    }
    Date& setDay(uint8_t day) {
        _day = day;
        return *this;
    }

    rapidjson::Document toJSON() {
        rapidjson::Document doc;
        auto& allocator = doc.GetAllocator();
        doc.SetArray().PushBack(_year, allocator).PushBack(_month, allocator).PushBack(_day, allocator);
        return doc;
    }

private:
    uint16_t _year;
    uint8_t _month;
    uint8_t _day;
};
{'fraction_non_alphanumeric': 0.1186367558239862, 'fraction_numerical': 0.015530629853321829, 'mean_word_length': 2.28005657708628, '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': '4893177', 'n_tokens_mistral': 843, 'n_tokens_neox': 830, 'n_words': 181}