How to get the Date Of Birth given number of years months and days of a person in java

techjogi :

Given year, month and days of a person, need to get Date of Birth - Example - 19 years 1 moth and 2 days 16-Sept-2010 (have calculated it manually, may not be accurate)

Michel_T. :
LocalDateTime.now().minusYears(years).minusMonths(months).minusDays(days)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=309436&siteId=1