<commit_before>class Day < ActiveRecord::Base
  belongs_to :month, touch: true
  has_many :slots, dependent: :destroy
  has_many :events, through: :slots

  default_scope { order('value') }

  after_validation :set_wday_any_position

  # Validations
  #
  validates :value,
            presence: true,
            uniqueness: true

  def school_day?(federal_state, religion = nil)
    self.events.where(eventable: federal_state).where(religion: [nil, religion]).none?
  end

  def weekend?<commit_msg>No idea.<commit_after>class Day < ActiveRecord::Base
  belongs_to :month, touch: true
  has_many :slots, dependent: :destroy
  has_many :events, through: :slots

  default_scope { order(value: :desc) }

  after_validation :set_wday_any_position

  # Validations
  #
  validates :value,
            presence: true,
            uniqueness: true

  def school_day?(federal_state, religion = nil)
    self.events.where(eventable: federal_state).where(religion: [nil, religion]).none?
  end

  def weekend?
{'fraction_non_alphanumeric': 0.1027944111776447, 'fraction_numerical': 0.0, 'mean_word_length': 3.8689320388349513, 'pattern_counts': {'":': 0, '<': 5, '<?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': '574142', 'n_tokens_mistral': 327, 'n_tokens_neox': 320, 'n_words': 75}