using System;
using Ylbtech.Model;
namespace Ylbtech.Common
{
/// <summary>
///JiDu 的摘要说明
/// </summary>
public class JiDu
{
/// <summary>
///JiDu 的摘要说明
///author:YuanBo
///date:21:09 2013/6/27
/// </summary>
public class JiDu
{
/// <summary>
/// 判断当前是当年的第几季度
/// </summary>
/// <returns>第几季度,该季度开始的首月份</returns>
public static JiDuInfo GetJiDuStartMonth()
{
JiDuInfo dal = new JiDuInfo();
//一年四季
string[] jiDuStr = new string[] { "01,02,03", "04,05,06", "07,08,09", "10,11,12" };
string jiDuStartMonth = string.Empty; //当前季度开始月份
string positionMonth = DateTime.Now.ToString("MM"); //当前月份
#region 获取当前年度
for (int i = 0; i < jiDuStr.Length; i++)
{
if (jiDuStr[i].IndexOf(positionMonth) != -1)
{
dal.JiDu = (i + 1).ToString();
dal.JiDuStartMonth = (i * 3 + 1).ToString();
}
}
#endregion
return dal;
}
public JiDu()
{
//
//TODO: 在此处添加构造函数逻辑
//
}
}
}