Azure B2C custom policies age calculator considering leap years

Raphael ramos 41 Reputation points
2022-04-12T17:19:34.097+00:00

Hi!

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
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-04-12T18:25:36.787+00:00

    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.

    Best,
    James


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.