Azure B2C custom policies age calculator considering leap years

Raphael ramos 41 Reputation points


I wonder if there is any way to calculate user's age considering leap years by using custom policies. I intend to implement a lightweight variation of the age-grouping custom policies.

Ideally, once it's handled, I could easily verify if the user is a minor or not:

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,892 questions
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
390 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 14,431 Reputation points Microsoft Employee

    Hi @Raphael ramos , are you talking about making this document more lightweight? You can implement age-gating straight forward like this and it takes leap years into consideration automatically. Why not use something that's already built in like this? Please let me know and I can help you further.