<commit_before>'use strict';
Entry.EXPANSION_BLOCK.weather = {
    isInitialized : false,
    init: function () {
        if(this.isInitialized) {
            return ;
        }
        Entry.EXPANSION_BLOCK.weather.date = new Date();
        $.get("/api/expansionBlock/weather").done(function(data) {
            Entry.EXPANSION_BLOCK.weather.data = data;
            Entry.EXPANSION_BLOCK.weather.isInitialized = true;
        });
    }
};

Entry.EXPANSION_BLOCK.weather.getData = function (locationStr, datetime) {
    if(this.data.length == 0 ) {
        throw new Error('NO WEATHER DATA');
    }
    return this.data.find(function (d) {return d.aplYmdt == datetime && d.locationStr == locationStr})
};

Entry.EXPANSION_BLOCK.weather.propertyMap ={
    //날짜별
    'the_lowest_temperature' : 'min_temp',
    'the_highest_temperature' : 'max_temp',
    'humidity' : 'humidity',
    'precipitation' : 'rain',
    'precipitation_probability' : 'rain_p',
    'wind_speed' : 'windspd',
    //현재
    'temperature' : 'temp',
    'concentration_of_fine_dust' : 'pm10'
};

Entry.EXPANSION_BLOCK.weather.getDate = function (key) {
    var date = Entry.EXPANSION_BLOCK.weather.date;
    switch (key) {
        case "yesterday":
            date.setDate(date.getDate() - 1);
            break;
        case "today":
            break;
        case "tomorrow":
            date.setDate(date.getDate() + 1);
            break;
        case "After_2_days":
            date.setDate(date.getDate() + 2);
            break;
        case "After_3_days":
            date.setDate(date.getDate() + 3);<commit_msg>[#9127] 다른날 날씨 블럭 가지고 올 때 시간 오류 수정.<commit_after>'use strict';
Entry.EXPANSION_BLOCK.weather = {
    isInitialized : false,
    init: function () {
        if(this.isInitialized) {
            return ;
        }
        Entry.EXPANSION_BLOCK.weather.date = new Date();
        $.get("/api/expansionBlock/weather").done(function(data) {
            Entry.EXPANSION_BLOCK.weather.data = data;
            Entry.EXPANSION_BLOCK.weather.isInitialized = true;
        });
    }
};

Entry.EXPANSION_BLOCK.weather.getData = function (locationStr, datetime) {
    if(this.data.length == 0 ) {
        throw new Error('NO WEATHER DATA');
    }
    return this.data.find(function (d) {return d.aplYmdt == datetime && d.locationStr == locationStr})
};

Entry.EXPANSION_BLOCK.weather.propertyMap ={
    //날짜별
    'the_lowest_temperature' : 'min_temp',
    'the_highest_temperature' : 'max_temp',
    'humidity' : 'humidity',
    'precipitation' : 'rain',
    'precipitation_probability' : 'rain_p',
    'wind_speed' : 'windspd',
    //현재
    'temperature' : 'temp',
    'concentration_of_fine_dust' : 'pm10'
};

Entry.EXPANSION_BLOCK.weather.getDate = function (key) {
    let date = new Date(Entry.EXPANSION_BLOCK.weather.date);
    switch (key) {
        case "yesterday":
            date.setDate(date.getDate() - 1);
            break;
        case "today":
            break;
        case "tomorrow":
            date.setDate(date.getDate() + 1);
            break;
        case "After_2_days":
            date.setDate(date.getDate() + 2);
            break;
        case "After_3_days":
            date.setDate(date.getDate() + 3);
{'fraction_non_alphanumeric': 0.13966480446927373, 'fraction_numerical': 0.006828057107386716, 'mean_word_length': 2.3855042016806722, 'pattern_counts': {'":': 10, '<': 3, '<?xml version=': 0, '>': 3, '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': '216192', 'n_tokens_mistral': 1125, 'n_tokens_neox': 1103, 'n_words': 179}