Exemplo n.º 1
0
        public static string GetIDBirthday([ExcelArgument(Description = "身份证号码")] string ID)
        {
            IDCardHelper idCardHelper = new IDCardHelper(ID);
            DateTime     dt           = idCardHelper.Birthday;

            if (!idCardHelper.checkBoll)
            {
                return(idCardHelper.CheckStr);
            }
            else if (dt > DateTime.Now)
            {
                return("穿越啦");
            }
            else if (dt != DateTime.Parse("0001-01-01"))
            {
                return(dt.ToShortDateString().ToString());
            }
            else
            {
                return("出生日期错误");
            }
        }
Exemplo n.º 2
0
        public static string GetIDAge([ExcelArgument(Description = "身份证号码")] string ID)
        {
            IDCardHelper idCardHelper = new IDCardHelper(ID);

            return(idCardHelper.Age);
        }