<commit_before> /**
 * The I mazon layer module.
 *
 * @return ImazonLayer class (extends CartoDBLayerClass)
 */
define([
  'moment',
  'uri',
  'abstract/layer/CartoDBLayerClass',
  'text!map/cartocss/Guyra.cartocss',
  'map/presenters/layers/GuyraLayerPresenter'
], function(moment, UriTemplate, CartoDBLayerClass, GuyraCartoCSS, Presenter) {

  'use strict';

  var GuyraLayer = CartoDBLayerClass.extend({
    options: {
      sql:  "SELECT cartodb_id, the_geom_webmercator, date, month, year, '{tableName}' as layer, '{tableName}' AS name FROM {tableName} WHERE date BETWEEN to_date('{startYear}-{startMonth}','YYYY-MM') AND to_date('{endYear}-{endMonth}','YYYY-MM')",
      cartocss: GuyraCartoCSS
    },

    init: function(layer, options, map) {
      var mapObj={month_to_change: moment(layer.maxdate).subtract(3, 'months').utc().format('MM'), year_to_change: moment(layer.maxdate).utc().format('YYYY')}

      this.options.cartocss = GuyraCartoCSS.replace(/month_to_change|year_to_change/g, function(matched){return mapObj[matched]});
      
      this.presenter = new Presenter(this);
      this.currentDate = options.currentDate || [(layer.mindate), (layer.maxdate)];
      this._super(layer, options, map);
    },

    /**
     * Used by UMDLoassLayerPresenter to set the dates for the tile.
     *
     * @param {Array} date 2D array of moment dates [begin, end]
     */
    setCurrentDate: function(date) {
      this.currentDate = date;
      this.updateTiles();
    },

    /**
     * Get the CartoDB query.
     *
     * @return {string} CartoDB query<commit_msg>solved issue with dates<commit_after> /**
 * The I mazon layer module.
 *
 * @return ImazonLayer class (extends CartoDBLayerClass)
 */
define([
  'moment',
  'uri',
  'abstract/layer/CartoDBLayerClass',
  'text!map/cartocss/Guyra.cartocss',
  'map/presenters/layers/GuyraLayerPresenter'
], function(moment, UriTemplate, CartoDBLayerClass, GuyraCartoCSS, Presenter) {

  'use strict';

  var GuyraLayer = CartoDBLayerClass.extend({
    options: {
      sql:  "SELECT cartodb_id, the_geom_webmercator, date, month, year, '{tableName}' as layer, '{tableName}' AS name FROM {tableName} WHERE date BETWEEN to_date('{startYear}-{startMonth}','YYYY-MM') AND to_date('{endYear}-{endMonth}','YYYY-MM')",
      cartocss: GuyraCartoCSS
    },

    init: function(layer, options, map) {
      var mapObj={month_to_change: moment(layer.maxdate).subtract(3, 'months').utc().format('MM'), year_to_change: moment(layer.maxdate).subtract(3, 'months').utc().format('YYYY')}

      this.options.cartocss = GuyraCartoCSS.replace(/month_to_change|year_to_change/g, function(matched){return mapObj[matched]});
      
      this.presenter = new Presenter(this);
      this.currentDate = options.currentDate || [(layer.mindate), (layer.maxdate)];
      this._super(layer, options, map);
    },

    /**
     * Used by UMDLoassLayerPresenter to set the dates for the tile.
     *
     * @param {Array} date 2D array of moment dates [begin, end]
     */
    setCurrentDate: function(date) {
      this.currentDate = date;
      this.updateTiles();
    },

    /**
     * Get the CartoDB query.
     *
     * @return {string} CartoDB query
{'fraction_non_alphanumeric': 0.14598997493734336, 'fraction_numerical': 0.0015664160401002505, 'mean_word_length': 3.808734939759036, 'pattern_counts': {'":': 0, '<': 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': '3396904', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1080, 'n_words': 219}