<commit_before>function formatCost(cost) {
	return cost.toFixed(2);
}

define([
  'backbone'
  , 'm/bootstrap/tab'
  , 'project_billing/views/period'
  , 'project_billing/views/table'
  , 'project_billing/views/graph'
  , 'project_billing/collections/data'
], function(
  Backbone
  , BootstrapTab
  , PeriodView
  , TableView
  , GraphView
  , DataCollection
){
  return Backbone.Router.extend({
    initialize: function(){
      this.data = new DataCollection();
      this.data.reset();
      this.period_view = new PeriodView({el: $('.period-view'), router: this});
      this.table_view = new TableView({el: $('.table-view'), router: this});
      this.graph_view = new GraphView({el: $('.graph-view'), router: this});
      this.filter = undefined;
    },
    routes: {
      '': 'month'
      , 'today*actions': 'today'
      , 'month*actions': 'month'
      , 'year*actions': 'year'
      , ':period_start/:period_end*actions': 'custom_period'
    }
    , today: function(actions){
      $('.period-view a[href="#today"]').tab('show');      
      this.data.load({"kind": "today"});
      $('.custom-period-indicator').html('&nbsp;');
    }
    , month: function(actions){
      $('.period-view a[href="#month"]').tab('show');
      this.data.load({"kind": "month"});      
      $('.custom-period-indicator').html('&nbsp;');
    }
    , year: function(actions){
      $('.period-view a[href="#year"]').tab('show');
      this.data.load({"kind": "year"});
      $('.custom-period-indicator').html('&nbsp;');
    }
    , custom_period: function(period_start, period_end, actions){
      $('.period-view a[href="#custom_period"]').tab('show');
      $('.custom-period-indicator').html(period_start+' / '+period_end);
      this.data.load({"period_start": period_start, "period_end": period_end});
    }
  });
})<commit_msg>timezone conversion of custom billing<commit_after>function formatCost(cost) {
	return cost.toFixed(2);
}

define([
  'backbone'
  , 'm/bootstrap/tab'
  , 'project_billing/views/period'
  , 'project_billing/views/table'
  , 'project_billing/views/graph'
  , 'project_billing/collections/data'
], function(
  Backbone
  , BootstrapTab
  , PeriodView
  , TableView
  , GraphView
  , DataCollection
){
  function formatDateToISO(date){
    new_date = new Date(date.replace(/-/g, '/'));
    return new_date.toISOString();
  }
  return Backbone.Router.extend({
    initialize: function(){
      this.data = new DataCollection();
      this.data.reset();
      this.period_view = new PeriodView({el: $('.period-view'), router: this});
      this.table_view = new TableView({el: $('.table-view'), router: this});
      this.graph_view = new GraphView({el: $('.graph-view'), router: this});
      this.filter = undefined;
    },
    routes: {
      '': 'month'
      , 'today*actions': 'today'
      , 'month*actions': 'month'
      , 'year*actions': 'year'
      , ':period_start/:period_end*actions': 'custom_period'
    }
    , today: function(actions){
      $('.period-view a[href="#today"]').tab('show');      
      this.data.load({"kind": "today"});
      $('.custom-period-indicator').html('&nbsp;');
    }
    , month: function(actions){
      $('.period-view a[href="#month"]').tab('show');
      this.data.load({"kind": "month"});      
      $('.custom-period-indicator').html('&nbsp;');
    }
    , year: function(actions){
      $('.period-view a[href="#year"]').tab('show');
      this.data.load({"kind": "year"});
      $('.custom-period-indicator').html('&nbsp;');
    }
    , custom_period: function(period_start, period_end, actions){
      $('.period-view a[href="#custom_period"]').tab('show');
      $('.custom-period-indicator').html(period_start+' / '+period_end);
      this.data.load({
        "period_start": formatDateToISO(period_start),
        "period_end": formatDateToISO(period_end)
      })
    }
  });
})
{'fraction_non_alphanumeric': 0.20585189021232522, 'fraction_numerical': 0.0005178663904712584, 'mean_word_length': 3.325867861142217, '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': '7053485', 'n_tokens_mistral': 1287, 'n_tokens_neox': 1264, 'n_words': 190}