<commit_before>var validator = (function () {
    var postCreationValidation = function() {
        function dateValidation(date) {
            let created = new Date();

            if (date - created < 0) {
                return false;
            }

            return true;
        }

        function destinationValidation(from, to) {
            if (from === to) {
                return false;
            }

            return true;
        }

        function mobileNumberValidation(contact) {
            let numberRegEx = /^(\+359|0)\s?8(\d{2}\s\d{6}|[789]\d{7})$/igm;

            if (!(numberRegEx.exec(contact))) {
                return false;
            }

            return true;
        }

        function titleValidation(title) {
            if (title.length < 15 || title.length > 35) {<commit_msg>little bug fixed. Now it is possible to create a post today(It was not)<commit_after>'use strict';

var validator = (function () {
    var postCreationValidation = function() {
        function dateValidation(date) {
            let created = new Date();
            let differenceInDatesInDays=Math.abs((date - created)/1000/60/60/24);
            console.log(differenceInDatesInDays)

            if (differenceInDatesInDays > 1) {
                return false;
            }

            return true;
        }

        function destinationValidation(from, to) {
            if (from === to) {
                return false;
            }

            return true;
        }

        function mobileNumberValidation(contact) {
            let numberRegEx = /^(\+359|0)\s?8(\d{2}\s\d{6}|[789]\d{7})$/igm;

            if (!(numberRegEx.exec(contact))) {
                return false;
            }

            return true;
        }

        function titleValidation(title) {
            if (title.length < 15 || title.length > 35) {
{'fraction_non_alphanumeric': 0.11631663974151858, 'fraction_numerical': 0.022617124394184167, 'mean_word_length': 1.5006729475100942, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '7180372', 'n_tokens_mistral': 539, 'n_tokens_neox': 485, 'n_words': 114}