<commit_before>import React, { Component } from 'react';
import {getDay, getMonth} from './DateFunctions'

import '../styles/time.css';

class CalendarDateBox extends Component {

    constructor(props) {
        super(props);
    }

    render() {

        const date = this.props.date;

        let weekday = getDay(date.getDay());
        let month = getMonth(date.getMonth());

        return(
            <time className="icon">
                <i>{weekday}</i>
                <b>{month}</b>
                <span>{date.getDate()}</span>
            </time>
        )
    }

}

export default CalendarDateBox;<commit_msg>On hovering a date it now shows num. days till/since activity<commit_after>import React, { Component } from 'react';
import {getDay, getMonth} from './DateFunctions'

import '../styles/time.css';

class CalendarDateBox extends Component {

    constructor(props) {
        super(props);
    }

    render() {

        const date = this.props.date;

        let weekday = getDay(date.getDay());
        let month = getMonth(date.getMonth());
        let diff = date.getTime() - new Date().getTime();
        let titleInfo = null;
        if (diff < 0) {
            titleInfo = "For " + Math.abs(Math.ceil(diff / (1000 * 3600 * 24))) + " dager siden";
        }
        else {
            titleInfo = "Om " + Math.ceil(diff / (1000 * 3600 * 24)) + " dager";
        }

        return(
            <time className="icon" title={titleInfo}>
                <i>{weekday}</i>
                <b>{month}</b>
                <span>{date.getDate()}</span>
            </time>
        )
    }

}

export default CalendarDateBox;
{'fraction_non_alphanumeric': 0.14580801944106925, 'fraction_numerical': 0.01275820170109356, 'mean_word_length': 1.9150442477876106, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 19, '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': '5753294', 'n_tokens_mistral': 515, 'n_tokens_neox': 475, 'n_words': 113}