类 AgeUtils


  • public class AgeUtils
    extends Object
    版本:
    创建时间:2018年4月19日
    作者:
    ylyue
    • 构造器详细资料

      • AgeUtils

        public AgeUtils()
    • 方法详细资料

      • getAgeFromBirthDate

        public static int getAgeFromBirthDate​(String birthDate)
        根据年月日计算年龄
        参数:
        birthDate - 出生日期(格式:yyyy-MM-dd)
        返回:
        年龄
      • getBirthDateFromAge

        public static String getBirthDateFromAge​(int age)
        根据年龄获得生日(默认月份日期-01-01)
        参数:
        age - 年龄
        返回:
        生日(日期格式)