Jump to content

Recommended Posts

I often need to calculate a person’s age based on their date of birth for medical documentation. Ideally, the output would appear as “8-year, 3-month-old” as I have a pediatrics practice. Is there a workflow in Alfred for this? If not, can TextExpander or another app perform this quickly?

 

Thanks!

 

Sean

Link to comment

Sorry for the lack of clarity. I'd still like to enter the full date of birth (as "2003-Dec-16") but generate to the clipboard only the year and month (as "10y 1m"). 

 

Thanks again for your kind help!

 

Sean

Link to comment
8 minutes ago, middlebrun said:

I'd still like to enter the full date of birth (as "2003-Dec-16")

 

Enter or paste? That's a lot to type, and pasting is a waste of time when you could just select the date in another app and hit a hotkey.

Link to comment

delete these lines below from the python script, or use this version

if Days > 0:  
        finalString = finalString + str(Days) + 'd '

yes, as @deanishe says if you are able to select the date you might want to apply the script to the clipboard content and launch it with a hotkey

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...