You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
805 B
C#

11 months ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CommonModel
{
public class SplitDateId
{
/// <summary>
/// 开始日期
/// </summary>
public DateTime StartDate { get; set; }
/// <summary>
/// 结束日期
/// </summary>
public DateTime EndDate { get; set; }
public SplitDateId(string id, int index) {
StartDate = new DateTime(int.Parse(id.Substring(index, 4)), int.Parse(id.Substring(index + 4, 2)), int.Parse(id.Substring(index + 6, 2)), 0, 0, 0);
EndDate = new DateTime(int.Parse(id.Substring(index, 4)), int.Parse(id.Substring(index + 4, 2)), int.Parse(id.Substring(index + 6, 2)), 23, 59, 59);
}
}
}