<commit_before>﻿using System;
using System.Collections.Generic;

namespace BatteryCommander.Web.Services
{
    public enum FiscalYear : byte
    {
        // Oct 1 2016 - Sept 30 2017

        FY2017,

        // Oct 1 2017 - Sept 30 2018

        FY2018,

        // Oct 1 2018 - Sept 30 2019

        FY2019,

        // Oct 1 2019 - Sept 30 2020

        FY2020
    }

    public static class FiscalYearExtensions
    {
        public static IEnumerable<FiscalYear> Values()
        {
            foreach (FiscalYear year in Enum.GetValues(typeof(FiscalYear)))
            {
                yield return year;
            }
        }

        public static DateTime Start(this FiscalYear fy)
        {
            switch (fy)
            {
                case FiscalYear.FY2017:
                    return new DateTime(2016, 10, 1);

                case FiscalYear.FY2018:<commit_msg>Also add extension for next fiscal year<commit_after>﻿using System;
using System.Collections.Generic;

namespace BatteryCommander.Web.Services
{
    public enum FiscalYear : byte
    {
        // Oct 1 2016 - Sept 30 2017

        FY2017,

        // Oct 1 2017 - Sept 30 2018

        FY2018,

        // Oct 1 2018 - Sept 30 2019

        FY2019,

        // Oct 1 2019 - Sept 30 2020

        FY2020
    }

    public static class FiscalYearExtensions
    {
        public static IEnumerable<FiscalYear> Values()
        {
            foreach (FiscalYear year in Enum.GetValues(typeof(FiscalYear)))
            {
                yield return year;
            }
        }

        public static FiscalYear Next(this FiscalYear fy)
        {
            return
                fy
                .End()
                .AddDays(1)
                .ToFiscalYear();
        }

        public static DateTime Start(this FiscalYear fy)
        {
            switch (fy)
            {
                case FiscalYear.FY2017:
                    return new DateTime(2016, 10, 1);

                case FiscalYear.FY2018:
{'fraction_non_alphanumeric': 0.06783042394014963, 'fraction_numerical': 0.07531172069825437, 'mean_word_length': 1.3163972286374135, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6530394', 'n_tokens_mistral': 717, 'n_tokens_neox': 516, 'n_words': 158}