<commit_before><template lang='jade'>
  .am-datepicker-days
    table.am-datepicker-table
      thead
        tr.am-datepicker-header
          th.am-datepicker-prev
            i.am-datepicker-prev-icon(@click='GoPrev')
          th.am-datepicker-switch(colspan='5')
            .am-datepicker-select(@click='GoUpper') {{ presentingStr }}
          th.am-datepicker-next
            i.am-datepicker-next-icon(@click='GoNext')
        tr
          th.am-datepicker-dow(v-for='day in locales.daysMin') {{ day }}
      tbody
        tr(v-for='week in days')
          td.am-datepicker-day(v-for='day in week', :class='dayClasses(day)', @click='OnSelectDay(day)') {{day.day}}
</template>

<script>
import * as DateHelper from './utils/dateHelper'

export default {
  props: {
    locales: Object,
    date: Date,
    minDate: Date,
    maxDate: Date
  },
  data () {
    let presenting = new Date(this.date)
    presenting.setDate(1)
    return {
      presenting
    }
  },
  computed: {
    presentingStr () {
      let presenting = this.presenting
      return presenting.getFullYear() + this.locales.year[0] + ' ' + this.locales.months[presenting.getMonth()]
    },
    startDate () {
      let presenting = this.presenting
      let prevMonth = new Date(presenting.getFullYear(), presenting.getMonth() - 1, 1, 0, 0, 0, 0)
      let daysInMonth = DateHelper.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth())
      prevMonth.setDate(daysInMonth)
      prevMonth.setDate(daysInMonth - (prevMonth.getDay() - this.locales.weekStart + 7) % 7)
      return prevMonth
    },
    endDate () {
      let prevMonth = this.startDate
      let nextMonth = new Date(prevMonth)
      nextMonth.setDate(nextMonth.getDate() + 42)
      return nextMonth
    },
    days () {
      let startDate = this.startDate, endDate = this.endDate
      let maxDate = this.maxDate, minDate = this.minDate
      let date = new Date(startDate)
      let present = [], week = []
      while (date.valueOf() < endDate.valueOf()) {
        let type = 'cur'
        if (date.getMonth() === startDate.getMonth()) {
          type = 'old'
        } else if (date.getMonth() === endDate.getMonth()) {
          type = 'new'
        }
        week.push({
          date: new Date(date),
          day: date.getDate(),
          type,
          disabled: (minDate && date <= minDate) || (maxDate && date > maxDate)
        })
        if (date.getDay() === ((this.locales.weekStart + 6) % 7)) {
          present.push(week)
          week = []
        }
        date.setDate(date.getDate() + 1)
      }
      present.push(week)
      return present
    }
  },
  watch: {
    date () {
      let presenting = new Date(this.date)
      presenting.setDate(1)
      this.presenting = presenting
    }
  },
  methods: {
    GoPrev () {
      let presenting = new Date(this.startDate)<commit_msg>fix datapicker min<commit_after><template lang='jade'>
  .am-datepicker-days
    table.am-datepicker-table
      thead
        tr.am-datepicker-header
          th.am-datepicker-prev
            i.am-datepicker-prev-icon(@click='GoPrev')
          th.am-datepicker-switch(colspan='5')
            .am-datepicker-select(@click='GoUpper') {{ presentingStr }}
          th.am-datepicker-next
            i.am-datepicker-next-icon(@click='GoNext')
        tr
          th.am-datepicker-dow(v-for='day in locales.daysMin') {{ day }}
      tbody
        tr(v-for='week in days')
          td.am-datepicker-day(v-for='day in week', :class='dayClasses(day)', @click='OnSelectDay(day)') {{day.day}}
</template>

<script>
import * as DateHelper from './utils/dateHelper'

export default {
  props: {
    locales: Object,
    date: Date,
    minDate: Date,
    maxDate: Date
  },
  data () {
    let presenting = new Date(this.date)
    presenting.setDate(1)
    return {
      presenting
    }
  },
  computed: {
    presentingStr () {
      let presenting = this.presenting
      return presenting.getFullYear() + this.locales.year[0] + ' ' + this.locales.months[presenting.getMonth()]
    },
    startDate () {
      let presenting = this.presenting
      let prevMonth = new Date(presenting.getFullYear(), presenting.getMonth() - 1, 1, 0, 0, 0, 0)
      let daysInMonth = DateHelper.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth())
      prevMonth.setDate(daysInMonth)
      prevMonth.setDate(daysInMonth - (prevMonth.getDay() - this.locales.weekStart + 7) % 7)
      return prevMonth
    },
    endDate () {
      let prevMonth = this.startDate
      let nextMonth = new Date(prevMonth)
      nextMonth.setDate(nextMonth.getDate() + 42)
      return nextMonth
    },
    days () {
      let startDate = this.startDate, endDate = this.endDate
      let maxDate = this.maxDate, minDate = this.minDate
      let date = new Date(startDate)
      let present = [], week = []
      while (date.valueOf() < endDate.valueOf()) {
        let type = 'cur'
        if (date.getMonth() === startDate.getMonth()) {
          type = 'old'
        } else if (date.getMonth() === endDate.getMonth()) {
          type = 'new'
        }
        week.push({
          date: new Date(date),
          day: date.getDate(),
          type,
          disabled: (minDate && date < minDate) || (maxDate && date > maxDate)
        })
        if (date.getDay() === ((this.locales.weekStart + 6) % 7)) {
          present.push(week)
          week = []
        }
        date.setDate(date.getDate() + 1)
      }
      present.push(week)
      return present
    }
  },
  watch: {
    date () {
      let presenting = new Date(this.date)
      presenting.setDate(1)
      this.presenting = presenting
    }
  },
  methods: {
    GoPrev () {
      let presenting = new Date(this.startDate)
{'fraction_non_alphanumeric': 0.14158519553072627, 'fraction_numerical': 0.005935754189944134, 'mean_word_length': 2.2239729881823296, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '5794704', 'n_tokens_mistral': 1845, 'n_tokens_neox': 1799, 'n_words': 357}